Nov 10, 2009 #1 RonQA Technical User Joined Jun 24, 2007 Messages 61 Location US Here is what I have toyed with: If Check97 = True Then Forms![CAPA Form].[CAPA Title].Locked = False End If Access does not like this format. I have tried "Me.Allowedits = False" but then everything is locked. Any ideas? Thanks,
Here is what I have toyed with: If Check97 = True Then Forms![CAPA Form].[CAPA Title].Locked = False End If Access does not like this format. I have tried "Me.Allowedits = False" but then everything is locked. Any ideas? Thanks,
Nov 10, 2009 #2 dhookom Programmer Joined Jun 24, 2003 Messages 22,560 Location US Where is the code running? Is it in the same form as the controls? What is Check97? Have you considered renaming it to something like chkLockControls? If I understand correctly, you can use something like: Code: Me.[NameOfControl].Locked = Me.chkLockControls If you have more than one control to lock/unlock the consider typing "lock" into the tag property of the controls and use code like: Code: Dim ctl As Control For Each ctl in Me.Controls If ctl.Tag = "lock" ctl.Locked = Me.chkLockControls End If Next Duane Hook'D on Access MS Access MVP Upvote 0 Downvote
Where is the code running? Is it in the same form as the controls? What is Check97? Have you considered renaming it to something like chkLockControls? If I understand correctly, you can use something like: Code: Me.[NameOfControl].Locked = Me.chkLockControls If you have more than one control to lock/unlock the consider typing "lock" into the tag property of the controls and use code like: Code: Dim ctl As Control For Each ctl in Me.Controls If ctl.Tag = "lock" ctl.Locked = Me.chkLockControls End If Next Duane Hook'D on Access MS Access MVP