How to set field so it is read only

  • Follow


On a master form how do you set the field so that it is read only (data can 
not be changed)?
-- 
Thank you,  Jack
0
Reply Utf 11/21/2009 7:23:01 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 don't have bother with setting the textbox to locked.



Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Jack" <Jack@discussions.microsoft.com> wrote in message 
news:7E21FD52-91F1-467F-BA82-2F1B3D587831@microsoft.com...
> On a master form how do you set the field so that it is read only (data 
> can
> not be changed)?
> -- 
> Thank you,  Jack 


0
Reply Jeanette 11/21/2009 11:09:23 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

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

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

0
Reply KenSheridan 11/21/2009 12:54:03 PM

Thanks a lot.  It seem so easy when someone knows what they are doing.
-- 
Thank you,  Jack


"KenSheridan via AccessMonster.com" wrote:

> 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
> 
> Jack wrote:
> >On a master form how do you set the field so that it is read only (data can 
> >not be changed)?
> 
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-gettingstarted/200911/1
> 
> .
> 
0
Reply Utf 11/21/2009 8:43:01 PM

3 Replies
2739 Views

(page loaded in 1.358 seconds)

6/4/2014 2:58:58 PM


Reply: