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

Opening a form based on a choice in a combo box

Status
Not open for further replies.

jlindquist

Programmer
Jun 8, 2001
14
0
0
US
I have a form to search and filter out records, on that form I have a button to open up one of several forms which needs to be decided by the value in the combo box. This is sort of the same idea as the switchboard, but I can't get it to work...

Any ideas?
 
Try using :
select Case Combo1.value
Case "First form'
Docmd.openform "First form" etc. etc.

Put it in the after update of the combo box and the user won't have to push a button
 
Well jlindquist,

Use the following SQL statements as Rowsource for the ComboBox.
Code:
SELECT MSysObjects.Name FROM MsysObjects WHERE  (MSysObjects.Type)=-32768 ORDER BY MSysObjects.Name

or check faq181-690 for selecting other Access Objects via Combobox.

Good Luck.

 
docmd.openform me!cboMyComboBox 'If form name as bound column value

docmd.openform me!cboMyComboBox.column(ColumnNumber-1) 'If form name as other column value

Aivars

 
Thanks for your help everybody. I think I got it to work...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top