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!

How do I use a field value as search criteria?

Status
Not open for further replies.

ClockworkTemple

Technical User
Mar 29, 2006
1
US
How do I create a find that uses the value entered in a field as search criteria?

The first field in my database is to be a blank search field. When the user scans a barcode, the value is entered into this field. (Got that much, at least.) When they click the button below this field labeled SEARCH, the record whose ID number matches the value in this field needs to pop up. Easy, right? Not for me, I guess.

I have tried several things on my own, but to no avail. I'm sure this is something so impossibly simple, it ought to be funny. I'm a beginner at this, what can I say? I give you permission to laugh if you want, but while you're getting your kicks, please tell me what I can do to make my database desires a reality.
 
All you need to do is go into FIND mode before you scan the barcode into the ID Number field, then press ENTER.

But if you want to use a field and button, you need to define the field for scanning as a variable type field. Lets call it VarID.
* Put this field on the form and enter a valid ID into it.
* Do a manual FIND and enter =@VarID into the ID Number field. Click OK.
* Now on the Action Bar it will say "current find/sort" and you can type over that with a name to refer to your just completed FIND.
* In your macro attached to the search button, you use the FIND you created above.

Sue Sloan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top