Command Button - Find Record

GregSmith

Registered User.
Local time
Today, 17:46
Joined
Feb 22, 2002
Messages
126
When you select the command button (find record) it pops up the " Find and Replace " box. Is there anyway to type in a word in a unbound text box and have it search with the look in field set to: Tape Entry ( my form )
and the match set to: Any Part Of Field?

Click the find icon to see what I am trying to automate.

I've been at this for some time now...
 
You've got to build a query that pulls its criteria from the textbox's value. You would use this in the query's criteria for whatever field your searching on:

[Forms]![FormName]![FieldNameonForm]

Then use the wizard to create a button that opens up your results form. The result form's recordsource will be the query that you entered the above expression, so make sure you include all fields that you need for that form. This is how I do it in its most basic form. You could include some checks to make sure a value is entered before opening the form. One other thing I do is add a hidden field next to the textbox that puts an * at the end of the value and then the query pulls from the hidden textbox instead, so that it doesn't require an an exact match.

I would also check out these threads. They also explain how to modify the above to get out of requiring an exact match.
http://www.access-programmers.co.uk/ubb/Forum3/HTML/003512.html
http://www.access-programmers.co.uk/ubb/Forum3/HTML/003533.html

HTH
Scott

[This message has been edited by spalmateer (edited 04-23-2002).]
 

Users who are viewing this thread

Back
Top Bottom