Conditional formatting -can I test for emptiness?

L

Laurel

I have a bound field on a form that I want to be disabled if another field
on the form is empty. I tried choosing "is equal to" and "null" (didn't use
quotes), but that didn't work. Is there a way to test for emptiness when
using conditional formatting?

If I can't use conditional formatting to do this, where would I put code to
do it?
 
L

Laurel

I can't use "is." It's not one of the operators available in the dropdown
for conditional formatting.
 
L

Laurel

That's what I tried. I had to choose an operator and "equal" was the only
one that seemed OK. I used null as the value. As I described in my
original message, that didn't work.
 
G

Gina Whipp

Laurel,

The below should work, I just tested it. Attach it to the bound field on
your form.

Expression Is = IsNull([TheFieldThatWillBeBlank])

Though I am not sure how you are disabling a field like this. Have you
tried...

If (IsNull([YourField])) Then
Me.TheOtherField.Locked = True
Else
Me.TheOtherField.Locked = False
End If

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 

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