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
 
Top