I have a main form Switchboard that has a subform "qry_Search_Results_From_Switchboard subform".
the subform is linked to a qry with a search parameter, triggered by a search cmd button to provide the desired result and then update the subform and refresh its display on the main form.
here is my code for when i click the Search cmd button:
Private Sub Command20_Click()
'run query with search parameter
DoCmd.OpenQuery ("qry_Search_Results_From_Switchboard")
'refresh subform in main form "Switchboard" to show qry results
Me.[qry_Search_Results_From_Switchboard subform].Form.Refresh
End Sub
HERE IS MY ISSUE:
HOW DO I RUN THE QRY TO REQUEST THE PARAMETER W/O OPENIGN THE QRY. that is, i don't want to see the qry results in a different window i just want the results to show in the subform.
the subform is linked to a qry with a search parameter, triggered by a search cmd button to provide the desired result and then update the subform and refresh its display on the main form.
here is my code for when i click the Search cmd button:
Private Sub Command20_Click()
'run query with search parameter
DoCmd.OpenQuery ("qry_Search_Results_From_Switchboard")
'refresh subform in main form "Switchboard" to show qry results
Me.[qry_Search_Results_From_Switchboard subform].Form.Refresh
End Sub
HERE IS MY ISSUE:
HOW DO I RUN THE QRY TO REQUEST THE PARAMETER W/O OPENIGN THE QRY. that is, i don't want to see the qry results in a different window i just want the results to show in the subform.