Reports

  • Thread starter Thread starter Duane
  • Start date Start date
D

Duane

Hello,

I have a question about report design. I have a hazardous material report
that I am trying to make look as close to our department generated (state
wide) form which was made in MS Word. The issue I have has to do with the
entire page is a table with 7 columns and border shading.

Of course, using Access, the report stops as soon as there are no more rows
in the recordset. One report may only have 5 rows a data and another may
have 25 rows. I would like every report to show 30 rows on each page, even
if they are blank.

I am wondering if there is a way using VBA, to either measure the distance
used in the detail section and then have a routine to draw boxes to fill the
rest of the page, OR is it possible to have a routine write the data to an
existing Word document.

I know I can do this if it were in in Excel, with little trouble, but I
would rather learn how to write the data to MS Word document then to have to
recreate it in Excel.

Thanks in advance.
 
One thought would be to write the report's query's data into a temporary
table, and to add "empty" records to the table to give you a total number of
records where the total is a multiple of 30. The "empty" records would have
an empty string in each field so that ACCESS would print them on the report.
Then base the report's record source on a query that reads from that
temporary table.

This could be done via VBA code that runs as part of the code that opens the
report.
 
If the report layout is always the same and you want to use a Word
document then you can use Automation to export the Access data into a
Word document table.

Look at http://www.helenfeddema.com/access.htm (item 168 in the list)
for an example. Also item 3 on the Code Samples page of the same Web
site may be of interest.

HTH

Peter Hibbs.
 

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

Similar Threads


Back
Top