I am trying to lookup a record in a recordset. If no match is found then run an append query. I am having trouble coding the findfirst syntax. Any help is appreciated.
When I run the Function, it throws a RT error #3077 on the .findfirst line. (Syntax Error (Missing Operator) in expression. )
Code:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim WO As String
WO = Forms!frmdsh_workorder!txtWO
Set db = CurrentDb
Set rs = db.OpenRecordset("tblwoinspection", dbOpenDynaset, dbSeeChanges)
With rs
.FindFirst "[Point] = '" & "GMP's" & "' And [WO] = '" & WO & "'"
If rs.NoMatch Then
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryInspectionPointAppend_WOCloseout_GMP"
DoCmd.SetWarnings True
End If
End With
When I run the Function, it throws a RT error #3077 on the .findfirst line. (Syntax Error (Missing Operator) in expression. )
Last edited: