Can I add a header to an "OpenQuery" report?

  • Thread starter Thread starter Max Moor
  • Start date Start date
M

Max Moor

Hi All,
I want to open a query, and print it out. Right now, I'm using the
code:

DoCmd.OpenQuery "qryMyQuery", acViewPreview

Of course, when the query opens, the heading is "qryMyQuery." Is
there an alternate way to open a query, and be able to specify a heading?

- Max
 
Hi All,
I want to open a query, and print it out. Right now, I'm using the
code:

DoCmd.OpenQuery "qryMyQuery", acViewPreview

Of course, when the query opens, the heading is "qryMyQuery." Is
there an alternate way to open a query, and be able to specify a heading?

- Max

You have no control over the heading of a query (other than hiding it
completely by making the page header small).

Create a report. Use the query as the report's recordsource.
Now you can write whatever you want in the report or page header.
 
You have no control over the heading of a query (other than hiding it
completely by making the page header small).

Create a report. Use the query as the report's recordsource.
Now you can write whatever you want in the report or page header.

Hi Fred,
The problem is that the query changes. Depending on various options
set before it's created, it has different numbers of different fields each
time. I don't know how to build a report that can handle that.
 
Back
Top