Slow forward Navigation on a Report

  • Thread starter Thread starter Mohsen
  • Start date Start date
M

Mohsen

I have a report using a pass through query with number of
Joined tables. Running the report takes a long time, but
that is

not the major problem. my most concern is the time that
it takes to go to the next page/pages. To navigate to
just one

page forward it takes exactly the same when report is
loading. It seems that it runs the query again for any
single new

page.
Backward navigatation is very fast becasue data is
already cached.
I was wondering if anybody knows how to resolve this
problem by setting some properties of Report or changing
the query/...

Your reply will be appreciated.
 
Mohsen:

Do you have any code in the On Format events of the report? If so when
Access formats pages it can actually format it multiple times retreating and
re-formatting as data is pulled and evaluated. You might try wrapping your
On format code in

If FormatCount = 1 Then
'Run your code
End if

If that's not the problem, take a look at this knowledgebase article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;208858
 
Steve,

Thanks for your reply.
I don't have any code in the On Format events, but the
message on status bar says: "Formmating Page, ..." when
it is moving to the next page.

I also put the following code, but still the same thing
happens.


Private Sub PageHeader_Format(Cancel As Integer,
FormatCount As Integer)
If Me.Page > 1 Then
Cancel = 1
End If
End Sub

Any other idea?
 
Back
Top