Problems establishing layout of subreports

F

Flintstone

I am copying an official document but am having problems creating the
layout in Access.

Here is the required layout (You may need to copy and paste this into
notepad to see it properly):

¦-------------------------¦
¦ ¦
¦ Header ¦
¦-------------------------¦
¦ Subform 1 ¦ ¦
¦------------- Subform 2 ¦
¦ Subform 3 ¦ ¦
¦-------------------------¦

The problem is that Subform 3 must be on every page (It does not need
to remain as a subform as it is just a small grid for signatures).

o If I put all subforms in the detail section then subform 3 does not
appear until the last page of the report (Subform 2 is always very
long) ... also, subform 3 is then missing from all other pages.

o If I change the 'can grow' property of Subform 1 to 'No' then subform
3 appears on the first page but only a small number of Subform 1
results appear ... also, subform 3 is then missing from all other
pages.

o If I use Subform 3 in the page footer then all the correct results
are displayed but Subform 2 only displays a few results per page
because it is cut off level with the top of Subform 3 (Which is in the
page footer)

How can this layout be enforced? Is it even possible? Can somebody
please help me with this problem before I go totally insaine?
 
F

Flintstone

That difficult eh? Well I will try drawing the full page report in a
single report in access leaving all of the text fields unbound and then
using VBA to walk the recordset and populate the fields.

The only thing I don't know how to do is move to the next page
programmatically. So in short:

Open 2 recordsets
Count records to create page numbers: Page X of Y

While Recordsets 1,2 & 3 <> EOF
.. While recordset 1 <> EOF
.. populate left side of report (Max of 4 records per page)
.. Loop

.. While recordset 2 <> EOF
.. populate right side of report (Max of 6 records per page)
.. Loop

.. While recordset 3 <> EOF
.. populate bottom left side of report (Max of 2 records per page)
.. Loop

.. If Recordsets 1,2 & 3 <> EOF
.. MOVE TO NEXT PAGE
.. End if
Loop

Seems simple enough, now how do I move to the next page?
 

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