Automation question

R

Razor

Hi,

I have a report that is launched via a form.

The report has three totals in its footer.

How would I use Automation to do the following:

1. access the totals in the report footer,
2. perform some simple math on each total
3. insert the final numbers into bookmarks on a Word
template file (.dot)

Also, could someone point me to any explanatory materials
on Office automation, particularly on pushing data from
Access to Word.

Thanks a lot!

Regards,
Razor
 
E

Eric Isaacs

I would recommend not pulling the data out of the report,
but rather querying the database directly with VBA and SQL
to get the totals. That takes care of extracting the
report totals, if you just get them out of the data
directly.

If you need to tweak the totals in the report, those are
just formulas. You can change the formulas in the report.

As far as inserting them into a bookmark in a word
document, it's rather easy. I don't have any sample code
handy, but do a google search for "VBA createobject word"
and you should get some decent code snippets.
 

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