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

Selection from combo box to open another form

Status
Not open for further replies.

zerow

Programmer
Jan 11, 2006
1
0
0
US
Ok here it is. On my form I have to fields for ID, one is Drivers License and the other is Passport. These two options are listed in a Combo Box. If the enduser selects Drivers license I want it to open the Drivers license form for input, the same follows for the Passport ID.
 
You would put that code in your AfterUpdate event of the combo box. You would put what ever code you have to open your forms.

If you want a quick way to get the code to open forms, just create a button and then take the code that the wizard creates and use it in your AfterUpdate event.

Then you can use an If statement to state if the SelectedText is "drivers License" then bla bla bla...
else bla bla bla.

Let me know if you don't understand where i am going with this.
 
let him put the code in the onclick even of the combo box.
So when he click on the value the form opens. I trust you know VBA coding so hope that helps. "Just like docmd.openform whatevr whatever, etc. and docmd.close after if u want the form to close after the other form pop up r whatever." hopes this helps. i'm just a new learner myself.

Chaosguy - To die would be an awefully big adventure.
 
The onClick event would not be good becuase it would not give the user the chance to make the selection. It is better to the the AfterUpdate event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top