Enabled / Locked Properties (1 Viewer)

scouser

Registered User.
Local time
Today, 13:08
Joined
Nov 25, 2003
Messages
767
Guys I have a head scratcher. I have 2 forms to which I would like to prevent data entry in certain fields. I have set Enabled to NO and Locked to YES. Now this works fine for both forms. So what's my head scratcher? The fields in question on one form now display transparent i.e. do not display the back colour specified. If I set the Enabled to NO they display fine. The fields on both forms are identical?? Am I missing something?
Cheers,
Phil. :confused:
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:08
Joined
Feb 19, 2002
Messages
43,478
When the enabled property is set to No, Access changes the background of the control so it is "greyed". If you don't want this look, leave the field enabled but set the tabstop to No to prevent the cursor from stopping in the field. Just locking the control will prevent data entry. You don't also need to set the enabled property unless you want to.
 

scouser

Registered User.
Local time
Today, 13:08
Joined
Nov 25, 2003
Messages
767
Thanks

Thanks Pat. As I said both forms are identical yet Access does not grey out the fields in one form? I will do as suggested though.......
Cheers,
Phil.
 

GrahamB

Registered User.
Local time
Today, 13:08
Joined
Aug 13, 2003
Messages
22
If you set Enabled to False then it greys out the box. However if you set Locked to True then it will gain its original colour back.

If you check the two forms I think you will find that is the difference?
 

Mile-O

Back once again...
Local time
Today, 13:08
Joined
Dec 10, 2002
Messages
11,316
What's the point in having two identical forms? :confused:
 

scouser

Registered User.
Local time
Today, 13:08
Joined
Nov 25, 2003
Messages
767
What's the point?

What's the point indeed!! When I say identical I lie slightly. One is an enquiry form the other an order form. In essence they are the same,with slight differences...................................... :D
 

Users who are viewing this thread

Top Bottom