null values printing in access

G

Guest

I need to supress the print of null values when one controll value is null.
The suggestion I got was to use the Detail section Format event and us a
statement like Me![control name].Visible = True/False.
 
A

Allen Browne

Wayne, I'm not clear what the issue is: by default, the Null value shows as
completely blank.

If you wanted to reduce the blank space on the report, set the Can Shrink
property of the text box to Yes.

If the control has an attached label, and you want to get rid of that as
well, right-click the lablel and choose:
Change To | Text Box.
Then set the ControlSource of this new text box to:
=II([control name] Is Null, Null, "control name:")
Then set this quazi-label's Can Shrink property to yes as well. Provided
there is nothing else that overlaps these controls vertically on the report,
the space will shrink.

(You may also need to check that Access set the Can Shrink property of the
Detail section to Yes.)
 
G

Guest

Well what I need to do is print the report with 3 controls not printing when
Wayne, I'm not clear what the issue is: by default, the Null value shows as
completely blank.

If you wanted to reduce the blank space on the report, set the Can Shrink
property of the text box to Yes.

If the control has an attached label, and you want to get rid of that as
well, right-click the lablel and choose:
Change To | Text Box.
Then set the ControlSource of this new text box to:
=II([control name] Is Null, Null, "control name:")
Then set this quazi-label's Can Shrink property to yes as well. Provided
there is nothing else that overlaps these controls vertically on the report,
the space will shrink.

(You may also need to check that Access set the Can Shrink property of the
Detail section to Yes.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Wayne said:
I need to supress the print of null values when one controll value is null.
The suggestion I got was to use the Detail section Format event and us a
statement like Me![control name].Visible = True/False.
 
M

Marshall Barton

Wayne said:
I need to supress the print of null values when one controll value is null.
The suggestion I got was to use the Detail section Format event and us a
statement like Me![control name].Visible = True/False.


Don't forget to also set the coltrols' and their section's
CanShrink property to yes (in design view) so they don't
just leave a blank area in the report.
 
A

Allen Browne

Can you be more specific?

For example, do you want to suppress [State] and [City] when [Address] is
null or something?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Wayne said:
Well what I need to do is print the report with 3 controls not printing
when
Wayne, I'm not clear what the issue is: by default, the Null value shows
as
completely blank.

If you wanted to reduce the blank space on the report, set the Can Shrink
property of the text box to Yes.

If the control has an attached label, and you want to get rid of that as
well, right-click the lablel and choose:
Change To | Text Box.
Then set the ControlSource of this new text box to:
=II([control name] Is Null, Null, "control name:")
Then set this quazi-label's Can Shrink property to yes as well. Provided
there is nothing else that overlaps these controls vertically on the
report,
the space will shrink.

(You may also need to check that Access set the Can Shrink property of
the
Detail section to Yes.)

Wayne said:
I need to supress the print of null values when one controll value is
null.
The suggestion I got was to use the Detail section Format event and us
a
statement like Me![control name].Visible = True/False.
 
G

Guest

Yes when payment ID has a null value. The payment amount, payment date, and
amount will not print on the report.

Allen Browne said:
Can you be more specific?

For example, do you want to suppress [State] and [City] when [Address] is
null or something?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Wayne said:
Well what I need to do is print the report with 3 controls not printing
when
Wayne, I'm not clear what the issue is: by default, the Null value shows
as
completely blank.

If you wanted to reduce the blank space on the report, set the Can Shrink
property of the text box to Yes.

If the control has an attached label, and you want to get rid of that as
well, right-click the lablel and choose:
Change To | Text Box.
Then set the ControlSource of this new text box to:
=II([control name] Is Null, Null, "control name:")
Then set this quazi-label's Can Shrink property to yes as well. Provided
there is nothing else that overlaps these controls vertically on the
report,
the space will shrink.

(You may also need to check that Access set the Can Shrink property of
the
Detail section to Yes.)

I need to supress the print of null values when one controll value is
null.
The suggestion I got was to use the Detail section Format event and us
a
statement like Me![control name].Visible = True/False.
 
A

Allen Browne

The simplest solution would be to open the query in design view, and in the
Criteria under the [payment ID] field, enter:
Is Not Null

You could change the Control Source of the [payment amount] text box to:
=IIf([payment ID] Is Null, Null, [payment amount])
You will also need to change the Name of the control.

The query method is better. It is simpler more efficient, and it does more
than just suppress the printing of the fields, so it keeps any totals
correct too.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Wayne said:
Yes when payment ID has a null value. The payment amount, payment date,
and
amount will not print on the report.

Allen Browne said:
Can you be more specific?

For example, do you want to suppress [State] and [City] when [Address] is
null or something?

Wayne said:
Well what I need to do is print the report with 3 controls not printing
when
on of them is a null value.

:

Wayne, I'm not clear what the issue is: by default, the Null value
shows
as
completely blank.

If you wanted to reduce the blank space on the report, set the Can
Shrink
property of the text box to Yes.

If the control has an attached label, and you want to get rid of that
as
well, right-click the lablel and choose:
Change To | Text Box.
Then set the ControlSource of this new text box to:
=II([control name] Is Null, Null, "control name:")
Then set this quazi-label's Can Shrink property to yes as well.
Provided
there is nothing else that overlaps these controls vertically on the
report,
the space will shrink.

(You may also need to check that Access set the Can Shrink property of
the
Detail section to Yes.)

I need to supress the print of null values when one controll value is
null.
The suggestion I got was to use the Detail section Format event and
us
a
statement like Me![control name].Visible = True/False.
 

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