Help with FindFirst

TDZ7200

New member
Local time
Today, 13:18
Joined
Dec 3, 2012
Messages
7
I have two recordsets and I want to check if data from one recordset appears in the other.

My code is :
Dim db As Database
Dim rs As DAO.Recordset
Dim rs2 As DAO.Recordset

Set db = CurrentDb()
Set rs = db.OpenRecordset("Articles")
Set rs2 = db.OpenRecordset("Specifications", dbOpenDynaset)

NN = rs![Number]
rs2.FindFirst ("Number = " & NN)


Of course, I use a loop to walk through recordset rs. 'Number' is a column which appears in both tables 'Articles' and 'Specifications'.

I receive the error : data type mismatch in criteria expression on the command rs2.FindFirst ("Number = " & NN)

Does anybody has an idea ?
 

Users who are viewing this thread

Back
Top Bottom