Hi
please have a look at the following code:
dim var_range as variant
dim var_first_field as variant
dim var_second_field as variant
what i would like to do is use an if statement to compare the
"var_first_field" with var_second_field" by using the "var_range"
for example:
var_first_field=25
var_second_field=30
var_range=>
what i want it to do is:
if 25>30 then
msgbox("hi")
endif
how do i generate the code such that
if var_first_field & var_range & var_second_field then
msgbox("hi"
endif
Sandra Daigle - 09 Mar 2005 15:54 GMT
Try using the Eval function:
if Eval (var_first_field & var_range & var_second_field) then
msgbox "hi"
endif

Signature
Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.
> Hi
>
[quoted text clipped - 23 lines]
> msgbox("hi"
> endif