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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

having access automatically enter a criterion for a parameter query 1

Status
Not open for further replies.

jweber

MIS
Nov 4, 2002
28
US
I am working on a form where (after pressing a button) key elements are deleted. I have a parameter query set to pull up the correct record, however, this still requires the user to enter the ID as it appears on screen. Is there any way to have access put that ID in the criteria when the query is run? (Each time this is done, the ID will be different...)

THANKS!
 
Yes, take the parameter out of the query. Then, under the criteria of the field you want to use put this:

[forms]![your form name]![combobox name]

Create a popup form and add one unbound combo box on it. The underlying data of the combo box is of course the field you want to have input automatically...

Create a macro that opens your form, which is based on your query. The macro will run on click on a command button on the popup form you just created...

Hope that helps

 
Thanks for your post, but I figured it out...I put [Forms]![ReHire]![EmpID] and it works great. I've never used a pop up box before, but anyways, thanks for the post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top