Results 1 to 7 of 7
  1. #1
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115

    Apertura maschera se dato presente


    Hello, through code
    [code]
    If Not IsNull (Me.cmbCd) Then
    DoCmd.OpenForm "Recensione_personale" acNormal, "", "[IdCd] = [Forms]! [Recensione_personale]! [CmbCd]," acEdit, acNormal
    end If
    [code]
    I get that it opens a mask. I wish they would not open if it is not present in the data table "recensione_personale"


    thanks
    Hello

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You can test with DCount(), and only open if the result is greater than 0.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    Hello, I carry the modified file that might be useful to altri.Hello
    Attached Files Attached Files

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Not sure if that's a question? You're not using code, so in a macro the DCount() would be in the Condition.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    Carry the code used


    As Variant Dim MioTitolo


    MioTitolo = DLookup ("[recensione_personale]", "lista_cd", "[idcd] =" _
    & "'" & Forms! Ricerca_cd! Lista.Column (0) & "'")
    If Not IsNull (Me.lista) And Len (MioTitolo)> 0 Then
    DoCmd.OpenForm "Recensione_personale" acNormal, "", "[Title] = [Forms]! [Ricerca_cd]!
    [List]," acEdit, acNormal
    else
    Exit Sub
    'MsgBox "No personal review", vbInformation, "..: Warning: .."
    end If

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Is there a question? In the sample, there are no records in that listbox to test on.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    sergran is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jun 2013
    Posts
    115
    I needed that selecting a list, it opened a mask only if the text field of the text contained connected

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums