How to set field so it is read only

J

Jack

On a master form how do you set the field so that it is read only (data can
not be changed)?
 
J

Jeanette Cunningham

If you want a text box to be read only, you set its Locked property to Yes
(on the Data tab of its property sheet).

If you want all data on the form to be readonly, you set AllowEdits to No.
Then you don't have bother with setting the textbox to locked.



Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
K

KenSheridan via AccessMonster.com

If you also set a control's Enabled property to False (No) as well as its
Locked property to True (Yes) the user will not be able to move focus to the
control. Setting the Enabled property to False without making the Locked
property True has the same effect, but in this case the control's background
is greyed out, whereas setting both leaves its appearance as normal.

One thing to be aware of if setting a form's AllowEdits property to False is
that, not only will this make any bound controls read only, but it will also
disable any unbound controls such as an unbound combo box for selecting a
record to move to for instance. So if you want the bound controls to be non-
editable, but to have unbound controls available to the user disable/lock the
relevant bound controls individually.

Ken Sheridan
Stafford, England
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top