open forms with combo boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am new to this: Is it possible to open a form which contain main details
(like orders headings) and have a combo box where you select a catergory
(hotels, flights etc) and takes you to that catergory form??
 
Create a 2 column combo that has the category name and the name of the form
to open for that category. Set the properties in your combo box so that only
the category displays. It should be column(0). Then in the after update
event of the combo box:

DoCmd.OpenForm Me.MyCombo.Column(1)
 
Sorry Klatuu, I must be a bit thick but I have entered as you said but when I
select the catergory it says that I do not have a Macro DoCmd. I have tried
putting a macro (to open form) but then it says there is no openform.me etc.
Any furthet help you can offer???
 
Hi John,
When the cursor is located in the after update event of the button you'll
see a button with three dots on the right, click it, you have to select from
three options, select the code builder, then you'll be taken to the code
section, insert in the middle the open form command line

Private Sub ComboName_AfterUpdate()
DoCmd.OpenForm Me.MyCombo.Column(1)
End Sub

When you type the command stait in the property box, it's looking for a
macro in that name, and this is why you prompt with the error message
 
Back
Top