AllowEdits
(1)
Stafford
(1)
Sheridan
(1)
Textbox
(1)

How to set field so it is read only

Asked By Jack
21-Nov-09 02:23 AM
On a master form how do you set the field so that it is read only (data can
not be changed)?
--
Thank you,  Jack

If you want a text box to be read only, you set its Locked property to Yes(on

Jeanette Cunningham replied to Jack
21-Nov-09 06:09 AM
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 do not have bother with setting the textbox to locked.



Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

If you also set a control's Enabled property to False (No) as well as

KenSheridan via AccessMonster.com replied to Jack
21-Nov-09 07:54 AM
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


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-gettingstarted/200911/1

Thanks a lot. It seem so easy when someone knows what they are doing.

Jack replied to KenSheridan via AccessMonster.com
21-Nov-09 03:43 PM
Thanks a lot.  It seem so easy when someone knows what they are doing.
--
Thank you,  Jack
Post Question To EggHeadCafe