Current page number of a report

  • Thread starter Thread starter sdiehl
  • Start date Start date
S

sdiehl

Guest
How can I obtain the current page number of a report being displayed in preview mode, for use in VBA?
 
A search of MS Access help (2000) for 'report page number' gave the following helpful topic: Page, Pages Properties.

HTH,
David R
 
Thanks for the info. This question was originally posted on my request. Let me clarify a bit more. My issue is NOT with production of the report. My need is to be able to access the report page number being viewed in a report preview window. (I won't go into the why). I am not clear if the preview of a report is displayed under direct control of Access or whether it is done via use of the snapshot program. I found some references to accessing snapshot's "currentpage" but so far can't make that work.
 
It s under control of access. I never tried but I believe you can have the On.Print event give you the current page, since if I am not mistaken, it is triggered for each page prieviewed.

Alex
 
Thanks. I tried accessing the page number in an event that was triggered every second or so and couldn't get access to it. suggestion on exactly how to reference the current page?
 
First, my mistake. Use the report On_Page event.
Now, David R pointed you where to find info about the page number.

Ex:
Private Sub Report_Page()
Debug.Print Me.Page
End Sub

Alex

[This message has been edited by Alexandre (edited 02-08-2002).]
 
Thanks. This works slick - but is evoked only when a new page is created. I really need to access the current page number being displayed on the report preview. If you are only going forward thru pages, the above works. But if you page back, it doesn't. Further ideas to show the current page of a report preview being displayed???
 

Users who are viewing this thread

Back
Top Bottom