I am trying to compare two tables Data with this code:
Set rstA = dbs.OpenRecordset("SerialAccount_a")
Set rstB = dbs.OpenRecordset("SerialAccount_b")
While Not rstB.EOF
serialNumber = rstB.serial
rstB.Filter = "serial = '" & serial & "'"
Set rstFiltered = rstB
Do While Not rstFiltered.EOF
If rstA.Fields("serial") = rstB.Fields("serial") Then
If rstA.Fields("accountnumber") <> rstB.Fields("accountnumber") Then
accountMessage = "... do not match!"
Debug.Print accountMessage
ElseIf rstA.Fields("model_number") <> rstB.Fields("model_number") Then
modelMessage = "... do not match!"
Debug.Print modelMessage
End If
End If
Wend
Wend
When I try to run it, the compiler gives me the error "Method or data member not found" on the line:
serialNumber = rstB.serial
And I don't understand why, serial is a column in both of those tables. Can someone clue me in as to why this error is popping up?