Record search

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.
 
J

John W. Vinson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top