Progress Bar

M

Michel Walsh

Hi,


The progress bar on the status bar? The idea would be to have an integer
that will be incremented by one each time the detail print section of the
report get executed.

Open a new standard module:

===========
Option Compare Database
Option Explicit

Public Sub SetLimit(HowManyRecord As Long)
SysCmd acSysCmdInitMeter, "Printing...", HowManyRecord
End Sub
==========


In your report, have something like:

=================
Option Compare Database
Option Explicit
Dim coco As Long
----------------------------
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
coco = coco + 1
SysCmd acSysCmdUpdateMeter, coco
End Sub
-----------------------------
Private Sub Report_Close()
SysCmd acSysCmdClearStatus
End Sub
----------------------------
Private Sub Report_Open(Cancel As Integer)
coco = 0
End Sub
==================


Then, before printing your report, call

SetLimit numberOfRecordsToBePrinted

then, print the report.

Hoping it may help,
Vanderghast, Access MVP
 
Top