how to check for a value???

yogi

Registered User.
Local time
Today, 04:02
Joined
Mar 26, 2007
Messages
47
varname = test1, test2



for x = 1 to 2
flda = "test" & x
if flda = "1" then
flag=true
else
flag=flase
endif
next

I have new variable name call test1 and test2. I want to check if the value of both of these fields are equal to 1. The code above its not working and I'm missing something. What is the syntax to check FLDA?
 
have new variable name call test1 and test2. I want to check if the value of both of these fields are equal to 1.

Are they Variables, Controls, or Fields...which is it?

.
 
trying to populate a check box using values from a recordset
 
if field "test1" is a field in a recordset then

you need

myval = rs!test1 or
myval = rs.fields("test1")

so you can say
flda = "test" & x (where x is 1)

and then
myval = rs.fields(fllda)

ie not quite in the way you were trying
 

Users who are viewing this thread

Back
Top Bottom