Solved

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

Posted on 1998-12-17
3
924 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now