Results 1 to 4 of 4
  1. #1
    MunroeM is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2015
    Posts
    55

    Where condition on Combobox

    I have a table (TemmisTagT) that has 175 records and the last field is a yes/no field (SignedOut). On my form i have a combo box that i use to look up the records. Now is there a way to modify/add to the following code so only the records that are Not checked show up in the list? I know i can do it by making a new Querry but im just wondering if i can do it with a extra bit of code thats already there.



    Code:
    Private Sub Combo120_AfterUpdate()
    On Error GoTo Combo120_AfterUpdate_Err
        DoCmd.SearchForRecord , "", acFirst, "[TemmisTagNum] = " & "'" & Screen.ActiveControl & "'"
    
    Combo120_AfterUpdate_Exit:
        Exit Sub
    Combo120_AfterUpdate_Err:
        MsgBox Error$
        Resume Combo120_AfterUpdate_Exit
    End Sub
    Thanks

    Munroe

  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,642
    If you want to affect the records that show up in the list, you need to change the row source. Modifying this will not affect what's in the list.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    MunroeM is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2015
    Posts
    55
    Of course... perfect thanks
    i got it working now

  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,642
    Happy to help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 05-13-2015, 01:14 PM
  2. Replies: 1
    Last Post: 01-16-2015, 09:28 AM
  3. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Replies: 0
    Last Post: 12-16-2009, 01:14 PM

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