How to set a property on all text boxes in a form

G

Guest

Hi,

I want to switch the enable/disable property on all text boxes in a form
based upon the state of a field in the table behind the form (approved =
true/false). Is there a way to do this in VBA code without having to specify
all text boxes in the code. I need a function that traverses all the text
boxes in the form so that I can change their property.

Thanks for any assistance.

/Leif S
 
K

Keith Wilby

Leif S said:
Hi,

I want to switch the enable/disable property on all text boxes in a form
based upon the state of a field in the table behind the form (approved =
true/false). Is there a way to do this in VBA code without having to
specify
all text boxes in the code. I need a function that traverses all the text
boxes in the form so that I can change their property.

Thanks for any assistance.

You could loop through all controls and disable the text boxes but it would
be far easier to lock the whole form if at all possible - would that suffice
or do you have other data controls like combo boxes that you want to remain
active?

Regards,
Keith.
www.keithwilby.com
 
G

Guest

Keith,
It would work fine in my case to lock/unlock all controls in the frame. How?

/Leif
 
G

Guest

Keith,
Following your thread I applied AllowEdits = False on the form and got what
I was looking for.

/L
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top