search button

G

Gary G

Example: I have an underlying table with 550 records, each with a unique
9-digit identifying number. Instead of opening in form view and then using
the Find command to search for a specific record based on this unique number,
I would like to create a simple form entitled Search, then add a text field
where the user can enter the specific number of the record being sought.
Then, an accompanying command button that can be clicked to open that
specific record in form view once it is found.

I have tried several macro combinations , but to no avail. If I incorporte
the RunCommand action, then select Find as the action argument in my macro
it only brings up the normal search dialogue box which is what I want to get
away from.

For the sake of argument for those with suggestions, I will call the active
form Tracking Form, and the specific record I am searching for has the unique
identifying number of 12345-2009. What would the macro look like for what I
want to do?
 
S

Steve Schapel

Gary,

On the Click event of the command button, put a macro with an OpenForm
action, nominating the Tracking Form form in the Form Name argument. The
'Where Condition' argument would be like this:
[NameOfYour9DigitNumberField]=[Forms]![Search]![NameOfTheTextboxOnSearchForm]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top