Disable text boxes on conditions

tc1

New member
Local time
Today, 15:10
Joined
Jul 12, 2007
Messages
5
Hi Everyone,
I was wondering if someone could hele me with textbox problem. I have a form with many textobxes. say text1, text2,text3,text4. Now i run Dlookup() function which returns me text same as textbox names (text1,text2,text3,text4) depedning on condition which I store in a variable called temp.

Now what I want to do is I want to disable the textbox whose name is returned. so, If my variable temp gets value text1 then I want to disable text1.

I tried to do temp.Enabled=False, but it doesnt work.

Is there any other way of doing this?


Thanks
 
Me(temp).Enabled = False
 
great, thanks
 

Users who are viewing this thread

Back
Top Bottom