Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Posts
    3

    How to Find a Record

    I am trying to set up a FIND function on a screen. I do not want to use the FIND from the menu. The user wants to be able to enter a number in a field, and have the screen go to the correct record. Then I want to set the focus back in this field so I can do another find. The idea being minimal data entry.

    I am looking for suggestions for how to do this.



    Thank you in advance.
    Laurie

  2. #2
    Join Date
    Sep 2006
    Location
    Manchester, England
    Posts
    13
    you can do it through a filter.....

    create a textbox and a button and add the following code to the click event or use the change event to have the form filter as he user types...

    This is an example from a project i worked on :

    Code:
    Private Sub txtCustomID_Change()
        txtCustomID.SetFocus
        Me.Filter = "CustomID LIKE '" & txtCustomID.Text & "*'"
        Me.FilterOn = True
        txtCustomID.SetFocus
        txtCustomID.SelStart = Len(txtCustomID.Text)
    End Sub

  3. #3
    allochthonous is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2006
    Posts
    12
    Hmm...interesting. I am currently working on a project that requires the same.

    I have been using "FindRecord" action in a macro, but it has not been the best option. One problem is that it has to start over from the first record after each search. It also seems to "go bad" easily where the database has to be restarted. (Though I could be using it incorrectly)

    I may try this code as well.

    PK

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

Similar Threads

  1. Find data, load data, and save as a new record
    By hawzmolly in forum Access
    Replies: 0
    Last Post: 10-05-2008, 03:18 PM
  2. query to find the highest value in a field
    By jhjarvie in forum Queries
    Replies: 0
    Last Post: 09-02-2008, 02:27 PM
  3. Deleting Record Contents, not complete record...
    By Charles Waters in forum Access
    Replies: 2
    Last Post: 06-24-2008, 12:00 PM
  4. can't find language DLL
    By tequila in forum Access
    Replies: 0
    Last Post: 05-01-2008, 09:31 PM
  5. How do I find the serial value of Now()?
    By JoeG in forum Queries
    Replies: 0
    Last Post: 03-13-2007, 08:16 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