Comparing Variants

J

jody

I have a lookup statement returning the value "H" to a
variant field. When I use strcomp to compare this to
another variant or string containing "H", it won't return
a match i.e. 0. How can I compare the lookup variant to
value "H" ?
 
K

Ken Snell

You could try wrapping the DLookup function with CStr to cast it as a
string:

If "H" = CStr(DLookup("....etc.")) Then
 
Top