View Single Post
  #5  
Old May 7th, 2010, 04:54 AM posted to microsoft.public.access.forms
PieterLinden via AccessMonster.com
external usenet poster
 
Posts: 307
Default Disable and Lock All Feilds wiht a check box

Biss wrote:
Hi I am using MS 2007 and have a form that I would like to lock = yes and
enable = No on all fields..

I would like to do this by checking a check box.. I would also like to have
the lock = no and enable = yes when I uncheck the check box..

Any ideas would be appreciated..

Many thanks in advance.

Bob


I assume it works the same as all previous versions of Access

Dim ctl as Control
For Each ctl In Me.Controls
if ctl.Name"chkBoxToLeaveEnabled" Then
ctl.Enabled = (Not me.chkLockForm)
ctl.Locked = Me.chkLockForm
end if
Next ctl

then you could throw in an IF statement to skip over the checkbox....

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1