Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518

    Make sure you're choosing the third option, "find a record..." It should show if the form is bound directly to a table. If not, I can dig up the code and we can adapt it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  2. #17
    MSAccessOldTimer is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    46
    I was picking the wrong option. I did it again and now it created a macro. I have modified it, but it tells me my subform is not "open". I will continue to play with it, but thank you for getting me on the correct option to start with.

  3. #18
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    It shouldn't be referring to the subform, unless I'm goofed up on your setup.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #19
    MSAccessOldTimer is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    46
    How would it know which control the combo box should equal?

  5. #20
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The combo is the control. The code should in essence say "take me to the record displayed in the combo" based on the employee ID field. What is the code behind the combo?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #21
    MSAccessOldTimer is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    46
    So here is where I am at this morning:

    combo box [cmbLockSearch]. Row Source = SELECT qryLockSearch.LockNumber, qryLockSearch.ID FROM qryLockSearch ORDER BY qryLockSearch.LockNumber;

    The [ID] is from tblAssociates and the LockNumber is from tblLocks. They are joined together in the qryLockSearch


    My After Update function is:

    Private Sub cmbLockSearch_AfterUpdate()

    DoCmd.ShowAllRecords
    Forms.frmAssociateTraining.frmLocks_sub.Form.LockN umber.SetFocus
    DoCmd.FindRecord Me.CmbLockSearch

    'Set value of combo box equal to an empty string
    Me.CmbLockSearch.Value = ""


    End Sub

    When I select a lock number in the combo box, it acts like something is happening...I get a short delay, and there is a small symbol on the screen as if something is running in the background...this lasts about 1 or 2 seconds, and then nothing, and I am still on the same employee record.

  7. #22
    MSAccessOldTimer is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    46
    Hold the Bus!!! I think I have it! I was trying to reference the subform in the After Update macro. I changed it to the main form, and then I am using the ID number to actually locate the LockNumber. That seems to have done it!

    Thanks pbaldy for pointing me in the right direction!

  8. #23
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Problem filtering a subform
    By cebrower in forum Programming
    Replies: 5
    Last Post: 10-21-2019, 01:15 PM
  2. Filtering a subform - Please help
    By wrightyrx7 in forum Access
    Replies: 1
    Last Post: 04-12-2016, 07:33 AM
  3. Subform Not Filtering Properly
    By pmontalt in forum Reports
    Replies: 3
    Last Post: 07-08-2014, 12:28 PM
  4. Filtering a subform
    By JvdP in forum Forms
    Replies: 2
    Last Post: 03-16-2011, 08:48 AM
  5. Filtering a Subform
    By swalsh84 in forum Programming
    Replies: 2
    Last Post: 06-23-2010, 10:51 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