Discussion Locked

Access2000 - Open form based on input

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to set up a command button on the swtichboard to open a form based upon input from the user--specifically, when the user clicks the cmd button, it will prompt the user for input (e.g., license number) and pull up the corresponding recordwithin the form.

Thanks

5 replies

by dwdino

First build a query which pull the information necesary from the given tables.

Second, set the criteria for the field "drivers_license" to "[Which Drivers License Number?]"

Third, build a form based upon this query. You can use the wizard or design view.

Fourth, create your button on switchboard to open the form. When clicked it will present a popup box asking "Which Drivers License Number?". The user will enter it, then the form will open with the data.

by cheryldi

Place a text or combo box on the form with the command button. Create a macro to open the form with the details required using a 'where condition'.

The syntax for the 'where condition' is fieldname = Forms!NameOfFormWithButton!NameOfTextBox

For the scenario you suggested the 'where condition' could be:
[LicenseNo] = [Forms]![SearchForm]![License]

This discussion is closed to new replies.