?
Solved

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

Posted on 1998-12-17
3
Medium Priority
?
935 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
Helicopter earned 200 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

764 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