Erik said:
Hi!
I have three fields on a form. I want to "grey out" the to other
fields if the user select one of them and put some text in that
field. If i could look the two other fields from receving data at the
same time that would be great too..
So then, these controls are to be mutally exclusive, so that if there is
an entry made in any one of them, the others are to be disabled? If
that understanding is correct, you could do this with conditional
formatting (if you're using Access 2000 or later). For each of these
controls, set a formatting condition that disables the control if either
of the other controls is not Null.
Suppose you had three text boxes named "Text1", "Text2", and "Text3",
and you wanted them to behave like this. In design view, select Text1,
then click Format -> Conditional Formatting... Set the dropdown box for
Condition 1 to "Expression Is", and enter this for the expression:
Not (IsNull([Text2]) And IsNull([Text3]))
Then click the "Enabled" toggle button at the end of the formatting row
to make it be "Disabled".
Do the same thing for Text2 and Text3, except for them use the
expressions
Not (IsNull([Text1]) And IsNull([Text3]))
and
Not (IsNull([Text1]) And IsNull([Text2]))
respectively.