hey all hope u can help me wif this prob
ok i got a variable
then i put a value in itCode:Dim intID As Integer
then i open a database lookin for that valueCode:intID = lvwContacts.SelectedItem.Text
NOWCode:RS.Open "Select * from tblPcontacts where id='" & intID & "'", CN, adOpenStatic, adLockOptimistic
the problem i am having is:
"Data type mismatch in criteria expression"
now the data type in the database is "auto number"
i have tried doing this
but i stil get the same errorCode:intID = CInt(lvwContacts.SelectedItem.Text)
can some1 plz help
oh also if i do
put a number instead of variable it worksCode:RS.Open "Select * from tblPcontacts where id=1", CN, adOpenStatic, adLockOptimistic
plz help
tnx![]()




Reply With Quote