Report Footer

D

Duane

Hi,

I have a report based on a query. The report has a group header and footer.
There is a control in the group footer that does a count for the number of
records for each group. When there are no records returned, you get the
error message. I could use the On No Data event to cancel the report but
the person who uses the report wnats to include the report in his monthly
report, showing there were no records.

Is it possible to reference the control and make it invisible when there are
no records? Also would like to make a label visible stating "There were no
matching records." I have been trying to figure this out, but when I
reference the control in my If..Then..Else I get a runtime error stating the
control can't be found.

I am not sure if I can do what I am thinking, or if what I am trying to do
is not the best method. I am not sure if I should put my statement in the
Report On Open, Detail On Format, or the Footer On Format events.

Sure could use some help and/or suggestions.

Newbie
 
F

fredg

Hi,

I have a report based on a query. The report has a group header and footer.
There is a control in the group footer that does a count for the number of
records for each group. When there are no records returned, you get the
error message. I could use the On No Data event to cancel the report but
the person who uses the report wnats to include the report in his monthly
report, showing there were no records.

Is it possible to reference the control and make it invisible when there are
no records? Also would like to make a label visible stating "There were no
matching records." I have been trying to figure this out, but when I
reference the control in my If..Then..Else I get a runtime error stating the
control can't be found.

I am not sure if I can do what I am thinking, or if what I am trying to do
is not the best method. I am not sure if I should put my statement in the
Report On Open, Detail On Format, or the Footer On Format events.

Sure could use some help and/or suggestions.

Newbie

Add a label to the Report with what ever caption you wish.
Name the label "lblNoData".
Make it Not Visible.

Code the Report's OnNoData event.

Me![lblNoData].Visible = True
 
D

Duane

Thank you. Worked great and much easier then I thought.


fredg said:
Hi,

I have a report based on a query. The report has a group header and
footer.
There is a control in the group footer that does a count for the number
of
records for each group. When there are no records returned, you get the
error message. I could use the On No Data event to cancel the report but
the person who uses the report wnats to include the report in his monthly
report, showing there were no records.

Is it possible to reference the control and make it invisible when there
are
no records? Also would like to make a label visible stating "There were
no
matching records." I have been trying to figure this out, but when I
reference the control in my If..Then..Else I get a runtime error stating
the
control can't be found.

I am not sure if I can do what I am thinking, or if what I am trying to
do
is not the best method. I am not sure if I should put my statement in
the
Report On Open, Detail On Format, or the Footer On Format events.

Sure could use some help and/or suggestions.

Newbie

Add a label to the Report with what ever caption you wish.
Name the label "lblNoData".
Make it Not Visible.

Code the Report's OnNoData event.

Me![lblNoData].Visible = True
 

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