print report with "No Records" - when no results returned

B

_Bigred

(Access 2000)


I have a [Grievance Table]

Macro [Pending Grievances] and it sends results of "pending" records to a
report. (the query is set to list any grievances that have a empty "Employer
Decision" field.


Is there a way that when I run this query - if I have NO pending grievances
that report will return "No Pending Grievances This Month" on the actual
pending grievance report - for printing purposes.

(I know you can do a msgBox for your viewing, but I want to be able to run
this monthly report and have it either return the pending grievances or have
it return basically no records found on it so it can be printed out)

TIA,
_Bigred
 
F

Fredg

Add a Label to the report.
Caption: "No grievances to this month."
Visible: No
Name: 'NoGrievances'

Code the Report's OnNoData event:
[NoGrievances].Visible = True

If you also wish to hide those controls that display #error because
there is no data, then also code:

[ControlA].Visible = False
[ControlB].Visible = False
etc.
 
B

_Bigred

That worked beautifully !

You're the best,
_Bigred



Fredg said:
Add a Label to the report.
Caption: "No grievances to this month."
Visible: No
Name: 'NoGrievances'

Code the Report's OnNoData event:
[NoGrievances].Visible = True

If you also wish to hide those controls that display #error because
there is no data, then also code:

[ControlA].Visible = False
[ControlB].Visible = False
etc.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


_Bigred said:
(Access 2000)


I have a [Grievance Table]

Macro [Pending Grievances] and it sends results of "pending" records to a
report. (the query is set to list any grievances that have a empty "Employer
Decision" field.


Is there a way that when I run this query - if I have NO pending grievances
that report will return "No Pending Grievances This Month" on the actual
pending grievance report - for printing purposes.

(I know you can do a msgBox for your viewing, but I want to be able to run
this monthly report and have it either return the pending grievances or have
it return basically no records found on it so it can be printed out)

TIA,
_Bigred
 

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