Data Type Mismatch problem
I get a type mismatch with the sql statement below. I'm trying to select all of the records that match
the ID number in another table called frmPeople.
VB Code:
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select Giveaway_Date,ID_Num,Item_Given from Item where ID_Num = '" & frmPeople.txtFields(1).Text & "'", db, adOpenStatic, adLockOptimistic
Can anyone help!
Re: Data Type Mismatch problem
Code:
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select Giveaway_Date,ID_Num,Item_Given from [Item] where ID_Num = '" & frmPeople.txtFields(1).Text & "'", db, adOpenStatic, adLockOptimistic
Try that.
Also, if ID_Num is numeric, remove the single quotes from around it.