If then question

E

Ellen

Hello,
I have created a report in which I'd like a control to print "yes" or "no"
depending on whether a particular field is blank or not. If say, field 1, is
blank, I'd like the control to print "no". If it is not blank, I'd like the
control to print "yes".

Thanks in advance for your help,
Ellen
 
K

Ken Snell [MVP]

Use the IIf function in the control source's expression:

=IIf(Len([FieldName] & "")=0,"yes","no")
 
E

Ellen

Your code works beautifully!! Thanks, Ken!

Ellen

Ken Snell said:
Use the IIf function in the control source's expression:

=IIf(Len([FieldName] & "")=0,"yes","no")

--

Ken Snell
<MS ACCESS MVP>

Ellen said:
Hello,
I have created a report in which I'd like a control to print "yes" or "no"
depending on whether a particular field is blank or not. If say, field 1, is
blank, I'd like the control to print "no". If it is not blank, I'd like the
control to print "yes".

Thanks in advance for your help,
Ellen
 
Top