Combo box for a form to open a query

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Does anyone know how to create a combo box on a form that
when choosing from the list, to have it open a
query/report?
 
Here's a simple example of a combobox
opening either Query1 or Query2, present in the project.

Private Sub cboTest_AfterUpdate()
DoCmd.OpenQuery Me.cboTest
End Sub

Private Sub Form_Load()
With Me.cboTest
.RowSourceType = "Value List"
.RowSource = "Query1;Query2"
End With
End Sub

Krgrds,
Perry
 
Back
Top