If then question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Use the IIf function in the control source's expression:

=IIf(Len([FieldName] & "")=0,"yes","no")
 
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
 
I have a similar question but can't start a new thread. When clicked on the
"New" just blinks. Anyway, I will try for help here.

Using Access 2000. In my report I want the fldcode data to print only if the
fldprintcode is checked (true). How do I do that? I have tried code in detail
in both format and print. What would the code be. Is there a kb article on
this?"

Thanks
Marie
 
Serendipity said:
Using Access 2000. In my report I want the fldcode data to print only if the
fldprintcode is checked (true). How do I do that? I have tried code in detail
in both format and print. What would the code be. Is there a kb article on
this?"

Me.fldcode.Visible = Me.fldprintcode
 
Back
Top