Results 1 to 8 of 8
  1. #1
    Synergy.ron@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    washington
    Posts
    126

    Question I am rowsource confused on combo box as a filter

    I am using windows 10 with access 2019...



    I have a (I thought) simple membership app.
    In that app my main table is Members_tbl
    I also have a query based on that table. qry_MembersNav I am using windows 10 with access 2019...

    If I get the Lbox showing the members, once selected, the selected member does not appear in the bound fields. The pkey (memberID)


    Attachment 46232


    memberid does not show in it's bound counterpart. In fact none of the bound fields show....huh?

    what am i missing????

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    Your form is set as DataEntry. Go to Form Properties > Data Tab > Data Entry and set to NO.

    I dont do Macros but vba will be like this:
    Code:
    Private Sub Combo254_AfterUpdate()
    
    
        Dim rs As DAO.Recordset
        Set rs = Me.RecordsetClone
    
    
        rs.FindFirst "[IDMember] = " & Me.Combo254
    
    
        If Not rs.NoMatch Then
            Me.Bookmark = rs.Bookmark
        End If
        
    End Sub
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  3. #3
    Synergy.ron@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    washington
    Posts
    126

    Cool Combo ON UPDAate will not filter to record

    Hi,
    I have a membership app in which the user selects the desired member record from a combo box of members. Once selected, Access is supposed to show the fields for the selected record. It won't do it (or, I can't get it to do it.

    I've consulted numerous books and seen it done in the Access Masterclass on Youbube. But I am apparently missing something.... (I got working via a macro, but, I can't in vba... As usual hat am I missing?" Thanks for reading...

    Attachment 46252

  4. #4
    Synergy.ron@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    washington
    Posts
    126
    Moke,
    thanks for the reply. I implemented the code you specified....not working...... What am missing????

    Attachment 46253

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Try the following line as replacement code for the AfterUpdate event of the combo box:

    DoCmd.SearchForRecord , "", acFirst, "[IDMember] = " & Str(Nz(Screen.ActiveControl, 0))
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  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,518
    You never actually move the form. Try

    Dim rst As Object
    Set rst = Me.RecordsetClone
    rst.FindFirst "[IDMember] =" & Me.cboSelectMember.Value
    Me.Bookmark = rst.Bookmark
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    FYI I merged your duplicate threads since both had replies.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    Quote Originally Posted by Synergy.ron@gmail.com View Post
    Moke,
    thanks for the reply. I implemented the code you specified....not working...... What am missing????

    Attachment 46253
    You have:
    Code:
         Dim rst As Object
         Set rst = Me.RecordsetClone
         rst.FindFirst "[IDMember] =" & Me.cboSelectMember.Value
        rst.Requery
    You need to move to the bookmark.
    You should have:
    Code:
        Dim rs As DAO.Recordset
        Set rs = Me.RecordsetClone
    
    
        rs.FindFirst "[IDMember] = " & Me.cboSelectMember
    
    
        If Not rs.NoMatch Then
            Me.Bookmark = rs.Bookmark
        End If
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

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

Similar Threads

  1. Replies: 13
    Last Post: 09-07-2017, 04:11 AM
  2. How does one filter the RowSource of a combo box
    By GraeagleBill in forum Programming
    Replies: 12
    Last Post: 01-11-2016, 09:33 PM
  3. Combo box that filters the rowsource
    By billcar2006 in forum Access
    Replies: 3
    Last Post: 02-26-2015, 08:05 PM
  4. .RowSource Combo
    By white_flag in forum Access
    Replies: 1
    Last Post: 09-06-2011, 07:59 AM
  5. Filter by Form? Confused...
    By andmunn in forum Forms
    Replies: 0
    Last Post: 01-14-2010, 01:30 PM

Tags for this Thread

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