Ok Stupid Q time...

  • Thread starter evilcowstare via AccessMonster.com
  • Start date
E

evilcowstare via AccessMonster.com

In the Property settings what is the difference between Enabled and Locked???
Ive tried to find out but cant see anything anywhere, not even in access help.


Surely if its not enabled it would be locked anyway?
Or if enabled means you dont see it then that would be Visible no?

Its been bugging me so thought id finally try to see if someone knows?

Thanks
 
A

Albert D. Kallal

Well,

Enabled means the control can receive the focus.

Locked means the control can receive the focus.but, you can't change it.....

You might for example have a date field on your form. You might have the
control locked, but when the user double clicks on the control, a pop up
calendar is launched (so, you absolute FROWN upon users typing in
dates..but, you certainly want them to use a calendar control to force them
to enter correct dates.

So, all of the click event, double click, and things like focus events can
still fire (and be used by you). However, you sill don't want the user to be
able to modify the contents.....

If you set enabled = false..then the control can't even receive focus.

Without question in both cases where enabled = false, or locked = true, the
user can't modify the control, but there certainly cases where you want the
user to be able to tab through, or have controls receive the focus, but not
necessary edit data...

For example, you might have a continues form, and want the user to navigate
in the grid of data with eh arrow keys, but not allow some fields to be
modified....

So, I can think of many cases and scenarios where having both options is
just a another nice feature of ms-access....
 
J

Joan Wild

You can't edit in either case.
Locked (yes or no) can receive the focus
Enabled (no) can't receive the focus
 
F

Fred Boer

Dear evilcowstare:

One way to figure it out without access help is to experiment! :)

Enabled=Yes; Locked=No - normal editable control
Enabled=No; Locked=No - control is "grayed out" and inaccessible
Enabled=Yes; Locked=Yes - control looks normal, can be entered by cursor,
but cannot be edited/changed
Enabled=No; Locked=Yes - control looks normal, but it is inaccessible, and
cannot be edited/changed.

And yes, I suppose if it is not enabled, you may say it is also locked, but
the interplay between the two provides 4 modes.


HTH
Fred Boer
 
E

evilcowstare via AccessMonster.com

oh ok, Thanks for clearing it up :eek:)
Well,

Enabled means the control can receive the focus.

Locked means the control can receive the focus.but, you can't change it.....

You might for example have a date field on your form. You might have the
control locked, but when the user double clicks on the control, a pop up
calendar is launched (so, you absolute FROWN upon users typing in
dates..but, you certainly want them to use a calendar control to force them
to enter correct dates.

So, all of the click event, double click, and things like focus events can
still fire (and be used by you). However, you sill don't want the user to be
able to modify the contents.....

If you set enabled = false..then the control can't even receive focus.

Without question in both cases where enabled = false, or locked = true, the
user can't modify the control, but there certainly cases where you want the
user to be able to tab through, or have controls receive the focus, but not
necessary edit data...

For example, you might have a continues form, and want the user to navigate
in the grid of data with eh arrow keys, but not allow some fields to be
modified....

So, I can think of many cases and scenarios where having both options is
just a another nice feature of ms-access....
 
E

evilcowstare via AccessMonster.com

Thanks Fred, this makes it really clear !!! :eek:)

Fred said:
Dear evilcowstare:

One way to figure it out without access help is to experiment! :)

Enabled=Yes; Locked=No - normal editable control
Enabled=No; Locked=No - control is "grayed out" and inaccessible
Enabled=Yes; Locked=Yes - control looks normal, can be entered by cursor,
but cannot be edited/changed
Enabled=No; Locked=Yes - control looks normal, but it is inaccessible, and
cannot be edited/changed.

And yes, I suppose if it is not enabled, you may say it is also locked, but
the interplay between the two provides 4 modes.

HTH
Fred Boer
In the Property settings what is the difference between Enabled and
Locked???
[quoted text clipped - 7 lines]
 
F

fredg

In the Property settings what is the difference between Enabled and Locked???
Ive tried to find out but cant see anything anywhere, not even in access help.

Surely if its not enabled it would be locked anyway?
Or if enabled means you dont see it then that would be Visible no?

Its been bugging me so thought id finally try to see if someone knows?

Thanks

Access Help
Contents + Microsoft Access Help + Forms + Controls and Charts +
Labels and Text Boxes + Customizing controls + Make a control read
only

From the above Access help file:

Make a control read-only
Open a form, report, or data access page in Design view.
Make sure that the control is selected, and then click Properties on
the Form Design, Report Design, or Page Design toolbar to open its
property sheet.
In a form or report, do one of the following:
If you want to disable the control completely so that it's dimmed and
can't receive the focus, set the Enabled property to No.
If you want to make data in the control readable, but not allow users
to change the data, set the Locked property to Yes. If you set the
Enabled property to No and the Locked property to Yes, the control
won't appear dimmed, but it won't be able to receive the focus.
In a data access page, to disable the control completely so that it's
dimmed and can't receive the focus, set the Disabled property to True.

Tip

In a form or report, you can use the Enabled property together with
the AfterUpdate property to disable a control until a user enters text
or makes a selection in another control. For example, you might want
to disable a command button until data has been entered in a text box.
You can use the AfterUpdate property of the text box to call an event
procedure or a macro to enable the command button.
 
Top