Use expression to determine if comment should print or not

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

Guest

I am building a report that identifies corrections needed to records. The
form has 30 questions and 1= Need Correction 2= No correction. HERE is my
code =IIf([Correction]="1",[Text]). With this expression when correction is
needed my report prints a blank in the text field. Is their a way to tell the
report to only print records and fields where correction is = 1 with the text?
 
Why do you put the 1 inside " characters? That makes it a text 1, not a
numeric 1. Did you try this:

=IIf([Correction]=1,[Text],Null).

Also, is [Correction] the name of a field in the report's RecordSource? It
has to be, if this expression is to work.
 
Ken, thank you this helps some but when I run my report I still get a line in
my report if no correction is needed. I would like the report not print
anything and list only the questions needing corrections.

Ken Snell (MVP) said:
Why do you put the 1 inside " characters? That makes it a text 1, not a
numeric 1. Did you try this:

=IIf([Correction]=1,[Text],Null).

Also, is [Correction] the name of a field in the report's RecordSource? It
has to be, if this expression is to work.

--

Ken Snell
<MS ACCESS MVP>


Clay said:
I am building a report that identifies corrections needed to records. The
form has 30 questions and 1= Need Correction 2= No correction. HERE is my
code =IIf([Correction]="1",[Text]). With this expression when correction
is
needed my report prints a blank in the text field. Is their a way to tell
the
report to only print records and fields where correction is = 1 with the
text?
 
What else is printing on that "line"? If you have other controls along with
this one, you'll also need to tell them "not to print" if you don't want
them to print.

--

Ken Snell
<MS ACCESS MVP>


Clay said:
Ken, thank you this helps some but when I run my report I still get a line
in
my report if no correction is needed. I would like the report not print
anything and list only the questions needing corrections.

Ken Snell (MVP) said:
Why do you put the 1 inside " characters? That makes it a text 1, not a
numeric 1. Did you try this:

=IIf([Correction]=1,[Text],Null).

Also, is [Correction] the name of a field in the report's RecordSource?
It
has to be, if this expression is to work.

--

Ken Snell
<MS ACCESS MVP>


Clay said:
I am building a report that identifies corrections needed to records.
The
form has 30 questions and 1= Need Correction 2= No correction. HERE is
my
code =IIf([Correction]="1",[Text]). With this expression when
correction
is
needed my report prints a blank in the text field. Is their a way to
tell
the
report to only print records and fields where correction is = 1 with
the
text?
 
I see thank you.

Ken Snell (MVP) said:
What else is printing on that "line"? If you have other controls along with
this one, you'll also need to tell them "not to print" if you don't want
them to print.

--

Ken Snell
<MS ACCESS MVP>


Clay said:
Ken, thank you this helps some but when I run my report I still get a line
in
my report if no correction is needed. I would like the report not print
anything and list only the questions needing corrections.

Ken Snell (MVP) said:
Why do you put the 1 inside " characters? That makes it a text 1, not a
numeric 1. Did you try this:

=IIf([Correction]=1,[Text],Null).

Also, is [Correction] the name of a field in the report's RecordSource?
It
has to be, if this expression is to work.

--

Ken Snell
<MS ACCESS MVP>


I am building a report that identifies corrections needed to records.
The
form has 30 questions and 1= Need Correction 2= No correction. HERE is
my
code =IIf([Correction]="1",[Text]). With this expression when
correction
is
needed my report prints a blank in the text field. Is their a way to
tell
the
report to only print records and fields where correction is = 1 with
the
text?
 
Back
Top