how to tell if ms access report is in print preview, or printing/exporting?
am 01.11.2007 17:24:56 von mailjaneen
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
Re: how to tell if ms access report is in print preview, or printing/exporting?
am 01.11.2007 19:17:13 von Salad
mailjaneen@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.