Curiosity with acPropertyEnabled

Uvuriel03

Registered User.
Local time
Today, 18:19
Joined
Mar 19, 2008
Messages
115
I have a form with a bunch of text fields that the user fills in information for.

Now, depending on the company the user has selected on the splash page, certain fields are supposed to be disabled. I have a dlookup on the onCurrent event and it all works just fine, EXCEPT!

There are like 4 text boxes that get updated on the AfterUpdate of a related field.

IE, Company One requires the sizes of a box. So, all the fields related to box size get enabled. The Length(CM) field gets automatically filled in via coding behind the Length(IN) AfterUpdate event. It takes the length and converts it to CM and fills in that value.

If Company One did NOT require the sizes of a box, I have it set to disable the fields related to box size. Now, the curiosity here is that those boxes that get auto-updated (the ones like Length(CM)) do NOT seem to want to follow the acPropertyEnabled = False coding that the rest of the boxes DO follow. They remain enabled (I have them locked, but they are NOT grayed out) even though all the other text boxes with the same criteria are disabled.

Anybody have any ideas why??
 
If you lock a control AND disable it, it will not gray out. If you want it grayed out, then just set the Enabled property to No but leave the Locked NO as well.
 
Ah. Thank you! I want them to be locked if they are enabled, since I don't want the user to be able to change the auto-filled number, but I can just put it in the coding when to lock and unlock it, as well. ^__^
 

Users who are viewing this thread

Back
Top Bottom