I'm trying to filter a subform based on a value on the main form.
I'm filtering on 2 fields.
One is Job.
The for the second field, I want all the records that have the same characters prior to the 1st "R" in the string.
Here is the code.
I get a run time error '3075': Syntax error (missing operator) in query expression '[Job] ='C18231F' And [ContractorNumber Like '*' 12"
I'm filtering on 2 fields.
One is Job.
The for the second field, I want all the records that have the same characters prior to the 1st "R" in the string.
Here is the code.
Code:
If InStr(Me.ContractorNumber, "R") > 0 Then
Dim CN as String
CN = Left(Me.ContractorNumber, InStr(Me.ContractorNumber, "R") - 1)
Me.frmSubmittalEntryResubmittalList.Form.filter = "[Job] ='" & Me.Job & "' And [ContractorNumber] Like '*' '" & CN & "'"
Me.frmSubmittalEntryResubmittalList.Visible = True
Me.frmSubmittalEntryResubmittalList.Form.FilterOn = True
End If