Record search

  • Thread starter Thread starter Av8r43
  • Start date Start date
A

Av8r43

I have created combo boxes to look up records but have always created them on
the form for which the will be used. I have several different forms in my
database and it would be nice to put them all (record search combo boxes) on
a tab on the switchboard and have the correct form and record open. Any help
will be greatly appreciated.
 
I have created combo boxes to look up records but have always created them on
the form for which the will be used. I have several different forms in my
database and it would be nice to put them all (record search combo boxes) on
a tab on the switchboard and have the correct form and record open. Any help
will be greatly appreciated.

Well, we can't see how your database is structured but...

You could base each combo box on a query of the table for the corresponding
form; in the AfterUpdate event of the combo box put code like

Private Sub cboFormA_AfterUpdate()
Dim strDocument As String
strDocument = "FormA"
DoCmd.OpenForm strDocument, WhereCondition := "[Fieldname] = " & cboFormA
End Sub
 
Back
Top