hey all hope u can help me wif this prob

ok i got a variable

Code:
Dim intID As Integer
then i put a value in it

Code:
intID = lvwContacts.SelectedItem.Text
then i open a database lookin for that value

Code:
RS.Open "Select * from tblPcontacts where id='" & intID & "'", CN, adOpenStatic, adLockOptimistic
NOW

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

Code:
intID = CInt(lvwContacts.SelectedItem.Text)
but i stil get the same error

can some1 plz help

oh also if i do

Code:
RS.Open "Select * from tblPcontacts where id=1", CN, adOpenStatic, adLockOptimistic
put a number instead of variable it works

plz help

tnx