Hello,
I have an access database in access 2000. I have a variety of letters(reports) that are run in it. Here is my set up:
A command button on a form linked to a macro
The macro opens 6 reports(the letters)
There is a filter in the report that says yesnoboxinquery=True
What happens is the reports only pull data for which every yes no field there is. It works great. The problem is when there is no True. The report still comes up but has "error" in all the merge fields.
So I want to change the command box so that if the yesnoboxinquery=true Then it will open the report. It won't even try to open the report if there is no data for it.
How do I do that? Right now I have docmd.openreport(reportname). How do I get a If/Then that looks in a query for the true/false data.
I have an access database in access 2000. I have a variety of letters(reports) that are run in it. Here is my set up:
A command button on a form linked to a macro
The macro opens 6 reports(the letters)
There is a filter in the report that says yesnoboxinquery=True
What happens is the reports only pull data for which every yes no field there is. It works great. The problem is when there is no True. The report still comes up but has "error" in all the merge fields.
So I want to change the command box so that if the yesnoboxinquery=true Then it will open the report. It won't even try to open the report if there is no data for it.
How do I do that? Right now I have docmd.openreport(reportname). How do I get a If/Then that looks in a query for the true/false data.