By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,742 Members | 1,570 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,742 IT Pros & Developers. It's quick & easy.

how to tell if ms access report is in print preview, or printing/exporting?

P: n/a
Hello, can someone help me.

I want to display some fields on a report in print preview (i.e.
instructions), that I don't want to print to the printer or export to
file. I can't seem to find any way of telling that the report is
displaying in print preview, vs. being actually printed or emailed/
exported.

So for example when previewing, I'd do Me![Instructions].Visible =
True.
When printing, emailing, and exporting I'd do Me!
[Instructions].Visible = False.

I tried doing some stuff with Me.Printer.Port and Me.WindowWidth but
that didn't work.
Thanks

Nov 1 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ma********@yahoo.com wrote:
Hello, can someone help me.

I want to display some fields on a report in print preview (i.e.
instructions), that I don't want to print to the printer or export to
file. I can't seem to find any way of telling that the report is
displaying in print preview, vs. being actually printed or emailed/
exported.

So for example when previewing, I'd do Me![Instructions].Visible =
True.
When printing, emailing, and exporting I'd do Me!
[Instructions].Visible = False.

I tried doing some stuff with Me.Printer.Port and Me.WindowWidth but
that didn't work.
Thanks
I created a report. It has the fields CustomerID and CustomerName. I
created a report. It has a field called MakeVisible. And a button to
call the report either as preview or print.

If Preview, I set the field MakeVisible to True. If print, False.

In the OnFormat event of the detail band I put the following code
Me.CustomerID.Visible = Forms!Form1!MakeVisible

I did this in A97. In newer versions theres an OpenArgs event in
Reports you could use. If printing or exporting and called from the
menu you might need your own custom menu item to set a flag.

Nov 1 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.