Results 1 to 2 of 2
  1. #1
    geraldk is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    49

    Find Record with a While Clause (filter)

    Hello,



    I am looking for VBA code to find a record that would match a field from a form.

    I am able to go to next record using: DoCmd.GoToRecord , , acNext, but I would like to have a while clause there match value from a text field.

    I have an employee database that I would like find next record that would match a person name with their jobs history here. So, currently the user can click on a button and it will go to the next record without filtering the name, but I would like to only display records that would match the employee name.

    Any help would be appreciated.

    Thank you in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,648
    One method is parameterized query. Review: http://datapigtechnologies.com/flash...tomfilter.html

    Another involves use of RecordsetClone. Review: http://www.blueclaw-db.com/access_findfirst.htm
    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.

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

Similar Threads

  1. Replies: 14
    Last Post: 05-25-2012, 02:40 AM
  2. Best way to find a record?
    By Drak in forum Programming
    Replies: 3
    Last Post: 01-31-2012, 10:40 PM
  3. Find record
    By hithere in forum Programming
    Replies: 11
    Last Post: 01-10-2012, 04:26 PM
  4. Filter vs Find ?
    By Huddle in forum Access
    Replies: 4
    Last Post: 07-16-2010, 08:59 AM
  5. How to Find a Record
    By lschlitt in forum Programming
    Replies: 2
    Last Post: 09-09-2006, 06:24 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