Software

Prevent users from changing data by using Access form control properties

Access allows you to prevent users from inadvertently changing data on their forms. Here's how to set the control properties called Enable and Locked to prevent data entry.

Access provides a number of ways to prevent users from inadvertently changing data on their forms. One way is to set the control properties called Enable and Locked to prevent data entry.

For example, you create a form that will be used to make changes to clients' addresses. The first field control is a lookup field used to look up the client's customer number. When you select a number, the client's name and address automatically appear in their corresponding controls. However, you do not want users to make changes to the Customer Name field. You can prevent the user from making any changes to the field by following these steps:

  1. Open the form in Design view.
  2. Right-click the Name field.
  3. Under the Data tab, set the Locked property to Yes.

Setting the Locked property to Yes will prevent the user from making changes to the field, but the user can still tab to the field, click inside the field, and copy the field.

To prevent users from accessing the field, follow these steps:

  1. Open the form in Design view.
  2. Right-click the Customer Name field.
  3. Under the Data tab, set the Enabled property to No and then set the Locked property to Yes.

Even with the Enabled property turned off, the Customer Name field is still visible, so the user may attempt to click on it. To keep users from trying to work with the field at all, you can set the control so that both the control's label and its data are dimmed and disabled. Follow these steps:

  1. Open the form in Design view.
  2. Right-click the Customer Name field.
  3. Under the Data tab, set the Enabled property to No and then set the Locked property to No.
Miss an Access tip?

Check out the Microsoft Access archive, and catch up on other Access tips.

Help users increase productivity by automatically signing up for TechRepublic's free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.

Editor's Picks

Free Newsletters, In your Inbox