Dear Expert,
Getting run time error 2471, code below:
The expression your entered as query parameter produced this error: 'strCriteria '
error go in this line:
Please anybody help me.
Getting run time error 2471, code below:
Code:
Private Sub Quantity_AfterUpdate()
Dim strCriteria As String
Dim CusType As String
strCriteria = "[ID] = '" & Forms![frmInvoice]![CustomerType] & "'"
CusType = DLookup("[ID]", "Customer List", "strCriteria LIKE " & """" & "*Pet Store*" & """")
If Me.Quantity > 0 Then
If CusType > 0 Then
Me.UnitPrice = Me.cboFish.Column(1)
Else
Me.UnitPrice = Me.cboFish.Column(2)
End If
Me.NetAmount = Me.[Quantity] * Me.[UnitPrice]
ElseIf Me.Quantity = 0 Then
Me.UnitPrice = 0
Else
Me.UnitPrice = 0
Me.NetAmount = 0
End If
End Sub
error go in this line:
Code:
CusType = DLookup("[ID]", "Customer List", "strCriteria LIKE " & """" & "*Pet Store*" & """")