Code:
Dim dbs As Database
Dim rstCombined As DAO.Recordset
Dim rstExceptions As DAO.Recordset
Dim strCompare As String
'Open Recordsets
Set dbs = CurrentDb
Set rstCombined = dbs.OpenRecordset("qryCombined")
Set rstExceptions = dbs.OpenRecordset("qryExceptions")
'Find/Delete Exceptions
With rstCombined
rstExceptions.MoveFirst
.MoveFirst
Do While Not rstExceptions.EOF
strCompare = rstExceptions!exceptkey
[COLOR=red].FindFirst "CombineKey=" & strCompare[/color]
If .NoMatch = False Then
.Delete
End If
rstExceptions.MoveNext
Loop
End With
rstCombined.Close
rstExceptions.Close
Set dbs = Nothing
End Sub
I am receiving a "runtime 3077, syntax error (missing operator) in expression" error. 'CombineKey' is a valid field in the recordset and strCompare contains a value when the program halts. I'm a newbie and am stumped. Your help is appreciated.
~ grinnz ~
Listen to me online every Tue/Thu 6-9pm Eastern