I'm very new to Access VBA and am trying to open an access report based on two input text boxes and a combo box input.
This form consists of 2 unbound Start date and End date text boxes based on the Claim Process Date column; and there is a combobox to select the Customer name.
I'm trying to create a button which opens the report based on these three criteria, but I get a mismatched data type error.
Private Sub Command51_Click()
Dim strCriteria As String
strCriteria = "[Claim Process Date] BETWEEN #" & Me.txtStartDate & "# AND #" & Me.txtEndDate & "#" And "[Customer Name] = '" & Me.Combo49 & "'"
DoCmd.OpenReport "CustomerClaims", acViewPreview, strCriteria
End Sub
Any suggestion would be appreciated. Thank You
"[Customer Name] = '" & Me.Combo49.Value
? – Nimeshka Srimal