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

  • Thread starter Thread starter _Bigred
  • Start date Start date
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
 
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.
 
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
 
Back
Top