Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

Cycle through some controls and unlock

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RW - 22 May 2007 20:21 GMT
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!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.