>I tried your suggestions, here is my code. It wasn't working.
>The variable associated with my check box is nMultiOrd. I put this code in the Setup code for the screen.
>
>cStorePC = getenv("MACHINE$DEPT2")
>if alltrim(upper(cStorePC)) <> "ORDERING"
> SHOW GET nMultiOrd DISABLE
>endif
>
>Thanks again,
>
>Scott
Hi,
This code must run during the READ. Usually a field will be enabled or disabled during validation of another field.
A good place to put code that needs to run as the READ is starting in in a READ ACTIVATE procedure.
So, in the screen builder, go to the READ ACtivate snippet, ensure that it is defined as a procedure, not an expression, then add your code:-
cStorePC = getenv("MACHINE$DEPT2")
if alltrim(upper(cStorePC)) <> "ORDERING"
SHOW GET nMultiOrd DISABLE
endif
RETURN .t.