Select all fields

Kempes

Registered User.
Local time
Today, 23:08
Joined
Oct 7, 2004
Messages
327
Hi,

Does anyone know if code exists to (unlock or enable or Make visible) all fields in one go rather than keying ??????.locked = False for each field?

Thanks

Kempes
 
Don't know of a way other than looping through all controls on the form... If you catch yourself doing this more than a couple times, maybe you could put this in a seperate routine and pass the 'true' / 'false' to it as needed...
 
Thanks Ken. I would need to do something like that.

What will happen is, the administrator will gain access to roughly 12 forms with different locked options to the every day user. When admin goes in, they will have access to all options on whichever form he/she opens.

Any idea on where to start here?

thanks again
 
To start with, I think you could use the control's 'tag' property to indicate what role would have access to it or not. Say you could set it to 'all' if everyone could use it, 'admin' if it was to be locked for admin use only, etc... The loop trhough the control set when the form opens and read/set the controls as indicated with the 'tag' property... I haven't done much of the looping through the controls stuff - maybe someone else can chime with how to best do this....
 
Thanks,

I'll have a crack at that.

I've not done much loop coding either.
 

Users who are viewing this thread

Back
Top Bottom