Search Results Subform

tuktuk

Well-known Member
Joined
Nov 13, 2006
Messages
856
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.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,215,059
Messages
6,122,917
Members
449,093
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top