I've looked on this forum and other forums for similiar topics to try and piece it together myself. Not much luck.
I have a report based on a query. I have a form with a combobox(Combo5) that lists all the customers that have been entered tickets into our system.
All I want is to select a customer from the combobox, click the cmd button(CustomerSearchCommand) and have the report (CustomerSearchRa) filter the report to the value in the combobox(combo5)
In trying different things I've gotten confused on what my original code was for this command button.
Here's my command box code
Private Sub CustomerSearchCommand_Click()
On Error GoTo Err_CustomerSearchCommand_Click
Dim stDocName As String
stDocName = "Customer Search Ra"
DoCmd.OpenReport stDocName, acPreview, , "NOT SURE WHAT TO PUT HERE"
Exit_CustomerSearchCommand_Click:
Exit Sub
Err_CustomerSearchCommand_Click:
MsgBox Err.Description
Resume Exit_CustomerSearchCommand_Click
End Sub
The report does generate with all the entries in the query. I've tried putting values related to Combo5 in the "NOT SURE WHAT TO PUT HERE" area but still can't get it to work.
Thanks in advance.