Report & page breaks via VBA

T

txlandman

I have a report that when the OnOpen event is fired, I populate the unbound
controls with data via VBA. Most of my reports are 1 page and perform just
as they should. Page 1 is located in the Report header section. Page 2 and
beyond are located in the detail section. Here is the issue, when more than
2 pages are needed only 2 pages are printed and the data on page 2 is the
data from the last record picked up from my VBA code. I guess I need to
force some event to fire in order to "Print" a page once the unbound controls
are populated. Any help or guidance will be greatly appreciated.

Thanks
David
 
T

txlandman via AccessMonster.com

I get data from 10 different tables and want to ensure the integrity of the
data retrieved.

Duane said:
Why not just bind your report to a query, SQL statement, or table?
I have a report that when the OnOpen event is fired, I populate the unbound
controls with data via VBA. Most of my reports are 1 page and perform just
[quoted text clipped - 7 lines]
Thanks
David
 
D

Duane Hookom

I would think you could achieve integrity using queries. However, I would
look at binding the report to a record source that contains the same number
of records as expected in the report. You can then use the bound field or
fields as a basis for running code to fill other controls.
--
Duane Hookom
Microsoft Access MVP


txlandman via AccessMonster.com said:
I get data from 10 different tables and want to ensure the integrity of the
data retrieved.

Duane said:
Why not just bind your report to a query, SQL statement, or table?
I have a report that when the OnOpen event is fired, I populate the unbound
controls with data via VBA. Most of my reports are 1 page and perform just
[quoted text clipped - 7 lines]
Thanks
David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top