A
AJCrowley
I used to work with Access a lot, but it was a long time ago, and I'm having
a hard time working out how to do what should be a fairly simple task.
I want to create a report, with a similar structure to this:
Intro Page
-break-
Table of contents
-break-
table 1, 1 record per page (along with single field list of related records
from table 2)
-break-
table 2, 1 record per page
I've grown so used to scripting, that my instinct is just to use VBA to query
the tables and build the reports programatically, which makes perfect sense
to me, and since the records from the tables are one per page, so long as I
can calculate the length of my TOC, it should be a fairly trivial matter.
However, my problem is that apparently you can't add controls to a report
programatically.
The next thing I thought to try was using subreports. Problem is, page breaks
on subreports are ignored, so I can't force the one record per page rule,
which is a requirement. So this method isn't a great deal of use to me.
The final thing I thought to try was a UNION query, but one table has 10
fields, and one has 44. While I can just pad out the smaller table with dummy
expressions, it seems messy, plus that's a lot of controls to work out how to
rearrange and hide. It just doesn't seem like a practical solution.
Is there a sensible way to do this, or am I going to have to look to a third
party reporting solution?
Thanks for any help,
AJ
a hard time working out how to do what should be a fairly simple task.
I want to create a report, with a similar structure to this:
Intro Page
-break-
Table of contents
-break-
table 1, 1 record per page (along with single field list of related records
from table 2)
-break-
table 2, 1 record per page
I've grown so used to scripting, that my instinct is just to use VBA to query
the tables and build the reports programatically, which makes perfect sense
to me, and since the records from the tables are one per page, so long as I
can calculate the length of my TOC, it should be a fairly trivial matter.
However, my problem is that apparently you can't add controls to a report
programatically.
The next thing I thought to try was using subreports. Problem is, page breaks
on subreports are ignored, so I can't force the one record per page rule,
which is a requirement. So this method isn't a great deal of use to me.
The final thing I thought to try was a UNION query, but one table has 10
fields, and one has 44. While I can just pad out the smaller table with dummy
expressions, it seems messy, plus that's a lot of controls to work out how to
rearrange and hide. It just doesn't seem like a practical solution.
Is there a sensible way to do this, or am I going to have to look to a third
party reporting solution?
Thanks for any help,
AJ