Runtime Error 3464

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I keep getting a runtime error 3464, Data mismatch. ">><<" indicates the line the error is o
Set qdf = CurrentDb.CreateQueryDef("SelectInf"
qdfText = "SELECT * FROM [Device Table] WHERE [Device ID] = 119001
qdf.SQL = qdfTex
qdf.Clos
Set rs = qdf.OpenRecordset(dbOpenSnapshot) <

I am declaring rs As a DAO.Recordset
Can anyone see what the problem is? I'm stumped
 
Good Afternoon!

Is the field you are using in the WHERE statement defined
as a Text field? If so, you need to put quotation marks
around the 119001 value:

WHERE [Device ID] = '119001'"

The criteria value must be specified as the same data type
as the field. Hope this helps!

Dan

-----Original Message-----
I keep getting a runtime error 3464, Data
mismatch. ">><<" indicates the line the error is on
Set qdf = CurrentDb.CreateQueryDef("SelectInf")
qdfText = "SELECT * FROM [Device Table] WHERE [Device ID] = 119001"
qdf.SQL = qdfText
qdf.Close
Set qdf = CurrentDb.QueryDefs("SelectInf")
Set rs = qdf.OpenRecordset(dbOpenSnapshot) <<

I am declaring rs As a DAO.Recordset.
Can anyone see what the problem is? I'm stumped.

.
 
Back
Top