I am having issue with a "type mismatch" when I click my button to run a report with a parameter in the form. I have searched for the exact syntax but I am having issues finding it.
Here is my code. I am using a combo box to pick my criteria for the query that the report is based on. ANy help would be greatly appreciated.
Private Sub Command13_Click()
Dim strParamValue As String
strParamValue = Me.txtCourseName.Value ' Get value from text box
DoCmd.OpenReport "Course Completed by Employees", acViewPreview, , , "[Enter Course Name] = '" & strParamValue & "'"
End Sub
Here is my code. I am using a combo box to pick my criteria for the query that the report is based on. ANy help would be greatly appreciated.
Private Sub Command13_Click()
Dim strParamValue As String
strParamValue = Me.txtCourseName.Value ' Get value from text box
DoCmd.OpenReport "Course Completed by Employees", acViewPreview, , , "[Enter Course Name] = '" & strParamValue & "'"
End Sub