Access Database Reports: Determine what page number will display record "x"
Posted on 2008-10-20
I need an Access 2003 Database running on Windows to run a report behind the scenes and then return the page number where a specific record "starts".
Example: My Flower database holds many individual records and I print out a book that has options to A) print one flower record per page as well as B) print the records on continuously with no page breaks.
I have the code that works for opening the report page in preview mode for a specifc record I have selected. Note: This is NOT filtering. It is the process of viewing or going to (F5 function) a specific page within the report. ;)
What I don't have figured out is how to find out when the next record starts. (ie: what if a single record takes up 3 pages, but others pages have 3 records included?).
Here's what I have thus far:
DoCmd.OpenReport "MyFlowers", acViewPreview
By the way, I've searched high and low just to find anything that would get me this far. I think I need a point! *grin*
Any help would be much appreciated.