Solved

How to move to specific record in recordset and display on form

Posted on 1998-12-17
3
925 Views
Last Modified: 2009-12-16
How can I make a specific record the current record displayed on my edit form? I want to be able to type in a criteria in text box and move to the first record found matching the criteria. I have tried this using the findfirst method to no avail. I created the form with the wizard.
0
Comment
Question by:englm
3 Comments
 
LVL 8

Accepted Solution

by:
Helicopter earned 50 total points
ID: 1971420
Try using the recordsetclone. e.g.


Me.RecordsetClone.FindFirst "[lngYourID] = " & Me![txtYourTextbox]
Me.Bookmark = Me.RecordsetClone.Bookmark

In the afterupdate event of the textbox or behind a command button.
0
 
LVL 10

Expert Comment

by:brewdog
ID: 1971421
if you used the wizard to create the form, chances are you'd have to use this syntax:

DoCmd.FindRecord [criteria]

For instance, if you were typing in a LastName text box and then clicked a button to find, you'd do this:

LastName.setfocus
DoCmd.FindRecord "LastName = '" & LastName & "'"

This pulls the value from the text box and searches for it.

brewdog
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6875716
GREETINGS!

This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.  Also in the Community Support link is a question on how experts can help, if they wish, on the cleaning of old and abandoned questions.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question