A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Properties for read-only fields



 
 
Thread Tools Display Modes
  #1  
Old December 5th, 2006, 01:01 PM posted to microsoft.public.access.forms
CW
external usenet poster
 
Posts: 701
Default Properties for read-only fields

I know how to use the Enabled property (set as No) to prevent users editing a
field on a form, but have two questions:

1. By default the field then becomes greyed-out which is fine in itself but
we find that the shading is rather too heavy. I have tried editing the Back
Color property but even though I enter a different colour code or choose one
from the Custom Colours, it doesn't seem to take effect. Is it actually
possible to influence the Back Colour of a disabled field, or is this fixed?

2. In addition to the Enabled property, what extra control does the Locked
property provide? How does one use this, what effect does it have?

Thanks
CW


  #2  
Old December 5th, 2006, 01:43 PM posted to microsoft.public.access.forms
Sprinks
external usenet poster
 
Posts: 531
Default Properties for read-only fields

As far as I'm aware, there is no control over the appearance of a Disabled
field.

Locked = Yes prevents the data in the control from being changed. Using
Locked = Yes and TabStop = No is similar to setting Enabled = No without
greying out the control. The user can still mouse click into the control,
but cannot change it. You can add code to the OnEnter property to move the
cursor to another control if necessary, or simply provide a muter background
color to indicate that the control is unavailable for editing.

Sprinks

"CW" wrote:

I know how to use the Enabled property (set as No) to prevent users editing a
field on a form, but have two questions:

1. By default the field then becomes greyed-out which is fine in itself but
we find that the shading is rather too heavy. I have tried editing the Back
Color property but even though I enter a different colour code or choose one
from the Custom Colours, it doesn't seem to take effect. Is it actually
possible to influence the Back Colour of a disabled field, or is this fixed?

2. In addition to the Enabled property, what extra control does the Locked
property provide? How does one use this, what effect does it have?

Thanks
CW


  #3  
Old December 5th, 2006, 01:59 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Properties for read-only fields

If you set Enabled = No and Locked = Yes, it will behave like a control with
Enabled = No, but have the appearance of a normal control.

"CW" wrote:

I know how to use the Enabled property (set as No) to prevent users editing a
field on a form, but have two questions:

1. By default the field then becomes greyed-out which is fine in itself but
we find that the shading is rather too heavy. I have tried editing the Back
Color property but even though I enter a different colour code or choose one
from the Custom Colours, it doesn't seem to take effect. Is it actually
possible to influence the Back Colour of a disabled field, or is this fixed?

2. In addition to the Enabled property, what extra control does the Locked
property provide? How does one use this, what effect does it have?

Thanks
CW


  #4  
Old December 5th, 2006, 02:08 PM posted to microsoft.public.access.forms
Sprinks
external usenet poster
 
Posts: 531
Default Properties for read-only fields

Apologies to CW and thanks to you, Klatuu. I was misinformed and have been
similarly frustrated in controlling the appearance of disabled controls.
Thanks!

Sprinks

"Klatuu" wrote:

If you set Enabled = No and Locked = Yes, it will behave like a control with
Enabled = No, but have the appearance of a normal control.

"CW" wrote:

I know how to use the Enabled property (set as No) to prevent users editing a
field on a form, but have two questions:

1. By default the field then becomes greyed-out which is fine in itself but
we find that the shading is rather too heavy. I have tried editing the Back
Color property but even though I enter a different colour code or choose one
from the Custom Colours, it doesn't seem to take effect. Is it actually
possible to influence the Back Colour of a disabled field, or is this fixed?

2. In addition to the Enabled property, what extra control does the Locked
property provide? How does one use this, what effect does it have?

Thanks
CW


  #5  
Old December 5th, 2006, 02:30 PM posted to microsoft.public.access.forms
CW
external usenet poster
 
Posts: 701
Default Properties for read-only fields

Thanks to both Sprinks and Klatuu for your clear explanations. Klatuu's
solution is perfect in itself, and on top of that it remains possible with
these settings to manipulate the Back Colour i.e. to a lesser shade of grey,
so that is visually apparent to the users that is read-only.
The best of both worlds!!
Thanks again
CW

"Klatuu" wrote:

If you set Enabled = No and Locked = Yes, it will behave like a control with
Enabled = No, but have the appearance of a normal control.

"CW" wrote:

I know how to use the Enabled property (set as No) to prevent users editing a
field on a form, but have two questions:

1. By default the field then becomes greyed-out which is fine in itself but
we find that the shading is rather too heavy. I have tried editing the Back
Color property but even though I enter a different colour code or choose one
from the Custom Colours, it doesn't seem to take effect. Is it actually
possible to influence the Back Colour of a disabled field, or is this fixed?

2. In addition to the Enabled property, what extra control does the Locked
property provide? How does one use this, what effect does it have?

Thanks
CW


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:47 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.