Print Report Header

G

Guest

I do not always want the Report Header to print every time the report
prints. Report Header should print based on criteria that I supply.

i.e. I do not want the Report Header to print if strReport = "No".

How can I do this?
 
L

Larry Linson

Lamar said:
I do not always want the Report Header to print every time the report
prints. Report Header should print based on criteria that I supply.

i.e. I do not want the Report Header to print if strReport = "No".

"Criteria" is usually, in the Access world, used to refer to a limiting
clause in a Query, but I think that isn't what you mean here. In what form
does "strReport" exist -- a field in a Table, a variable in a module from
which you invoke the Report, or ???

In Access 2002 and later, there is an OpenArgs argument of the
DoCmd.OpenReport statement that can be used to pass text data to a Report
(prior to those versions OpenArgs was only available for Forms). The
corresponding OpenArgs property of the Report can be used to retrieve the
OpenArgs argument value in the Open event of the Report, or later events.
Alternatively, or primarily, in earlier versions, you can access a Text Box
on an OpenForm from within the Report, pass it as a property in a
user-created Class, or even (if you are the daring type) store the value in
a Public (Global) Variable.

You can, conditionally, set the Visible property of the Report Header to No
or False, based on the value passed to the Report.

Larry Linson
Microsoft Access MVP
 

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