Greying out options

S

StacyM

Is there a way that I can make a field in a form "grey out" depending on the
selection in another field? The user would still need to see what is in the
box, and expressions need to be able to access it, but the user can't change
it once they select something in another field. Thanks for your help!
 
B

Bob Quintal

Is there a way that I can make a field in a form "grey out"
depending on the selection in another field? The user would still
need to see what is in the box, and expressions need to be able to
access it, but the user can't change it once they select something
in another field. Thanks for your help!
Tables have Fields, forms have textboxes (or listboxes, comboboxes)

Use vb code to set the .enabled property of the textbox you want greyed
out.

You will need to place the code in the after_update event of the
controlling textbox, and also in the On_Current event of the form. .

if me.controllingBox = "12345" then
me.controlledBox.enabled = false
else
me.controlledBox.enabled = true
end if
 
J

John W. Vinson

Is there a way that I can make a field in a form "grey out" depending on the
selection in another field? The user would still need to see what is in the
box, and expressions need to be able to access it, but the user can't change
it once they select something in another field. Thanks for your help!

Yes, in A2002 and later. Select the control and use Format... Conditional
Formatting. One of the options is to disable a control based on the value of
another control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top