Results 1 to 5 of 5
  1. #1
    DenizBerkel is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2013
    Posts
    3

    Record Finder


    I prepared a simple database with a record finder. But it does not work and I can't figure it out why...
    Can someone help me with this?
    Thank you very much...
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Did you run Debug/Compile from the VBA editor? There are two Combo0_AfterUpdate events, run Debug/Compile and the one without code should go away.

    Have you step debugged (refer to link at bottom of my post for debugging guidelines). The value of listbox is FirstName but the code is looking for ID as criteria.

    The comboboxes accomplish nothing. Sure, they tell the listbox to requery but the list doesn't change because its RowSource doesn't have any filter criteria.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    DenizBerkel is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2013
    Posts
    3
    Quote Originally Posted by June7 View Post
    Did you run Debug/Compile from the VBA editor? There are two Combo0_AfterUpdate events, run Debug/Compile and the one without code should go away.

    Have you step debugged (refer to link at bottom of my post for debugging guidelines). The value of listbox is FirstName but the code is looking for ID as criteria.

    The comboboxes accomplish nothing. Sure, they tell the listbox to requery but the list doesn't change because its RowSource doesn't have any filter criteria.
    thanks for your reply. I made the changes that you mentioned. but couldn't quite understand what you meant by RowSource filter criteria. What kind of filter should I put there?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    If you want the listbox list to change dynamically based on combobox selection then need WHERE clause that references combobox as filter parameter. Like:

    ... WHERE somefield=[comboboxname] ORDER BY fieldname;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    DenizBerkel is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2013
    Posts
    3
    Quote Originally Posted by June7 View Post
    If you want the listbox list to change dynamically based on combobox selection then need WHERE clause that references combobox as filter parameter. Like:

    ... WHERE somefield=[comboboxname] ORDER BY fieldname;
    OK I will try to do it tomorrow and if I can't I may ask for your help again since this is something I have to do for my job.
    Thank you very much, it means a lot to me....

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

Similar Threads

  1. Replies: 4
    Last Post: 07-03-2013, 10:02 AM
  2. Replies: 3
    Last Post: 03-09-2013, 10:39 AM
  3. Replies: 3
    Last Post: 02-06-2013, 07:23 PM
  4. Replies: 2
    Last Post: 12-21-2012, 01:57 PM
  5. Library Finder
    By Phil_Howes in forum Programming
    Replies: 9
    Last Post: 05-30-2012, 05:57 AM

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