I have a form that contains contains over 100 controls (divided into tabs).
The locked default is "Yes". Is there some way I can flag certain controls so
that I can cycle through them with an "Edit" button and unlock them? There
are about 50 that will need to be unlocked and I'd rather not have 50 lines
in VB for Me.Controlname.Locked = False if there is another way. Perhaps
check to see if it is a tab stop and if so, unlock it?
I have the code to cycle through ALL controls to lock them. Any help would
be appreciated.
Thanks!
Klatuu - 22 May 2007 20:46 GMT
You could use the Tag property of each control you want unlocked or locked.
Put a value in it your code will understand and lock or unlock only the
controls with the value.

Signature
Dave Hargis, Microsoft Access MVP
> I have a form that contains contains over 100 controls (divided into tabs).
> The locked default is "Yes". Is there some way I can flag certain controls so
[quoted text clipped - 7 lines]
>
> Thanks!
Maurice - 22 May 2007 20:50 GMT
If you do have the code to loop through all the controls you could use the
tag property of the control. Place the word 'check' (or anything you like) in
the control tag and then in your loop check for the control tag by using an
if statement like
if ctl.tag="check" then
do some locking here
end if
that should do the trick with one loop.

Signature
Maurice Ausum
> I have a form that contains contains over 100 controls (divided into tabs).
> The locked default is "Yes". Is there some way I can flag certain controls so
[quoted text clipped - 7 lines]
>
> Thanks!
RW - 22 May 2007 22:37 GMT
Thanks to both of you. This worked very well.
> If you do have the code to loop through all the controls you could use the
> tag property of the control. Place the word 'check' (or anything you like) in
[quoted text clipped - 18 lines]
> >
> > Thanks!