Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

param query=form w/ one record,need cmdbutton find another record

Status
Not open for further replies.

keiserc

Technical User
Feb 24, 2004
16
US
I have a basic param query/form which displays a certain record (or recordset). How do I create a command button to requery a new record (or recordset). I don't want the user to have to close the form & start over to check a different record. I'm sure this is a basic thing. But I don't know where to start & I've searched all the posts I can think of.
 
If you have a parameter query for the recordset of your form like the following:

Code:
Select A.* FROM [i]yourtablename[/i] WHERE A.[ID] = [Enter ID#: ];

Then just put this code behind a command button:

Code:
Me.Requery

This should do it as the requery of the form will trigger a requery of the recordset and a new promping for your ID#.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top