S
Steve Vincent
I hope I can explain my need clearly:
I have a query that returns products sold by companies. I have a report
that displays these results. I run the report by clicking a command button
on a main "switchboard"-like form. The command button runs a Macro that has
a Where condition, so the currently displayed CompanyID equals the CompanyID
on the report, so the report is run only for the currently displayed company.
If the report runs for a company that has no products, the report is ugly
(just some headings with a couple of #Error messages sprinkled around).
I would like to create a Macro or filter or statement that will first check
to see if there are actually any records to display in the report. If there
are, then run the report as usual. If there are no records associated with
that CompanyID, then I would like to display a popup form that says, "There
are no products associated with this Company" , *instead of* displaying the
Report.
Any ideas? Do I need to modify the Where condition in the macro with an
if,then,else statement? If so, how do I test for the "null"-ness of records?
The filtering is happening on the report level, not the query level.
Thank you in advance for any help anyone might offer,
Steve Vincent
(e-mail address removed)
I have a query that returns products sold by companies. I have a report
that displays these results. I run the report by clicking a command button
on a main "switchboard"-like form. The command button runs a Macro that has
a Where condition, so the currently displayed CompanyID equals the CompanyID
on the report, so the report is run only for the currently displayed company.
If the report runs for a company that has no products, the report is ugly
(just some headings with a couple of #Error messages sprinkled around).
I would like to create a Macro or filter or statement that will first check
to see if there are actually any records to display in the report. If there
are, then run the report as usual. If there are no records associated with
that CompanyID, then I would like to display a popup form that says, "There
are no products associated with this Company" , *instead of* displaying the
Report.
Any ideas? Do I need to modify the Where condition in the macro with an
if,then,else statement? If so, how do I test for the "null"-ness of records?
The filtering is happening on the report level, not the query level.
Thank you in advance for any help anyone might offer,
Steve Vincent
(e-mail address removed)