You want to open a form by selecting a report in a combo box on your form.
I'm missing something.
I think you want to open another form or report by selecting it from a combo box.
Sure in the After Update event of the combo
--------------------------------------
Private Sub Combo2_AfterUpdate()
'If you have the exact spelling of the forms name you can do this trick
DoCmd.OpenForm Combo2.Text
End Sub
---------------------------
I created a Table with the exact spelling of the forms names
Then I create my combo box to look at that new table.
then I went into the After Update event of the combo and added the above code.
Now you could get fancy and get the spelling of every form in the database using VBA code
here is a snippet from Help
Sub AllOpenForms()
Dim frm As Form, ctl As Control
' Enumerate Forms collection.
For Each frm In Forms
' Print name of form.
Debug.Print frm.Name
' Enumerate Controls collection of each form.
For Each ctl In frm.Controls
' Print name of each control.
Debug.Print ">>>"; ctl.Name
Next ctl
Next frm
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.