how do I compare to integers when one has quotes around it?

A

adrian

i pull the information from a combobox that is from a table (autonumber,type)
put that number into a varible. and compare into to another table using
recondset and
varibles example
varible1 ="2" & varible2 =2 then do not match because the
first one has quotes around it. and when comparing the three combo boxes I
have the the from
only 2 of them do this the third does not put quotes around them why?
can someone help me please
 
D

Douglas J. Steele

If CLng(variable1) = variable2 Then

or

If Val(variable1) = variable2 Then

or

If variable1 = CStr(variable2) Then
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top