Hi Domenico,
Change the line:
DoCmd.OpenReport rep, acViewPreview,,, acHidden
To:
DoCmd.OpenReport rep, acViewNormal,,, acHidden
That should fix it.
Regards, Clive.
--- In MS_Access_Professionals@yahoogroups.com, Domenico Cozzolino <domcoz@...> wrote:
>
> Hi the Group.
> I have a very strange problem:
> I have Access 2007 SP3
>
> I have to print a report to a printer differ depending on a parameter in a.
> Ini file and the code:
>
> ....
>
> Private Sub PrintReport(rep)
> Dim rpt As Report
>
> DoCmd.OpenReport rep, acViewPreview,,, acHidden
> Set rpt = Reports(rep)
>
> 'GPrinter = parameter to ini file
>
> rpt.Printer = Application.Printers (gPrinter)
>
> DoCmd.OpenReport rep, acViewNormal
> DoCmd.Close acReport, rep, acSaveNo
> End Sub
> ...
>
> to first click to Print button takes about 3 min to print report , as
> follows click to Print Button (with other data) are immediate.
>
> Thank you very much
>
> And sorry for my english.
>
>
> [Non-text portions of this message have been removed]
>
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar