I am new to ms access, i need some help populating a subform (visitForm) according to a selection in a combobox(searchCombo) on the mainform(clientInfoForm)
so far it pulls up the info but opens up a new datasheet instead of populating the subform.
In the searchCombo box on change event i have :
Private Sub searchcombo_Change()
DoCmd.OpenQuery "visitResultsQuery"
Me.visitForm.Form.RecordSource = "visitResultsQuery"
Me.visitForm.requery
End Sub
The visitForm subform is based on the visitResultsQuery query.
Thanks in advance for your help!
so far it pulls up the info but opens up a new datasheet instead of populating the subform.
In the searchCombo box on change event i have :
Private Sub searchcombo_Change()
DoCmd.OpenQuery "visitResultsQuery"
Me.visitForm.Form.RecordSource = "visitResultsQuery"
Me.visitForm.requery
End Sub
The visitForm subform is based on the visitResultsQuery query.
Thanks in advance for your help!