You are here:

Business Software/Enabled, Locked Properties

Advertisement


Question
Hi Scottgem,

My question is: How do I set up my data entry form in Access so that when I place a "check" in a box, the area's in the relating catagory will "lose focus" and will no longer accept input and the tab will pass over it to the next section. I already have the check box set up with the Yes/No feature. Can I please have step-by-step instructions for this? If you are able to help with this I will be able to contribute in the future to this site. I appreciate the last question you answered in such a timely fashion even though the info you gave me did not help.

Thanks again.

Answer
Every control on a form has two properties that can prevent it being edited. The Enabled and the Locked properties. When Enabled is set to No, the control is grayed out and will not allow it to receive focus. If Locked is set to Yes, the control can receive focus, but not be changed.

You can set these properties in VBA, using the After Update event of the checkbox. For example:

Me.txtControl.Locked = Me.chkLocked

or

If Me.chkLocked = True Then
Me.txtControl.Enabled = False
Else
Me.txtControl.Enabled = True
End If

I really can't be more specific since it depends on what Property you want to use and how. But this should give you an idea.

HTH
Scott<>

Business Software

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer some questions on a wide variety of business applications, including MS Office, Lotus Smartsuite, Visio, Notes and many others.

Experience

I have over 16 years of experience as an IT professional, supporting a wide variety of business applications.

©2012 About.com, a part of The New York Times Company. All rights reserved.