Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Programming

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 06-05-2006, 10:44 AM
Novice
 
Join Date: May 2006
Posts: 3
lschlitt
Default 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
Reply With Quote
  #2  
Old 09-01-2006, 02:31 PM
Novice
 
Join Date: Sep 2006
Location: Manchester, England
Posts: 13
DanInManchester
Default

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
Reply With Quote
  #3  
Old 09-09-2006, 04:24 PM
Novice
 
Join Date: May 2006
Posts: 5
allochthonous
Default

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
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find data, load data, and save as a new record hawzmolly Access 0 10-05-2008 01:18 PM
query to find the highest value in a field jhjarvie Queries 0 09-02-2008 12:27 PM
Deleting Record Contents, not complete record... Charles Waters Access 2 06-24-2008 10:00 AM
can't find language DLL tequila Access 0 05-01-2008 07:31 PM
How do I find the serial value of Now()? JoeG Queries 0 03-13-2007 06:16 AM


All times are GMT -8. The time now is 02:55 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.