field name

kermit

Registered User.
Local time
Today, 02:37
Joined
Dec 20, 2002
Messages
12
Is there a way to reference a field name from a variable?
for instance:

i have a field on a form named q1 I would like to reference this field from the qty expression that i set and then use the qty in the Me.qty.enabled expression. Is there a way to do this?

Dim cont as string
Dim qty as string
cont = 1
qty = "q" & cont
Me.qty.Enabled = True

OR...

can i just use Me.[q & myNum].Enabled = True

I need to loop through a bunch of controls that all start with q and have a different number after it.
Any ideas?

thanks
-kermit
 
Me.Controls("q" & cont).Enabled = True
 
Exactly what i was looking for!
thanks again
-k
 

Users who are viewing this thread

Back
Top Bottom