Solved

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

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

760 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

19 Experts available now in Live!

Get 1:1 Help Now