export filtered data to word

  • Thread starter Thread starter nicolascaprais
  • Start date Start date
N

nicolascaprais

Hello, I use MS Access 2k2 on Windows Xp.



I have created an application thanks to the great concentration of grey
matter on this forum.

I now get down to publishing my results to my clients in a clean
way. Indeed, I want to export my results, and not all the results
but only the filtered results, to word document, which will be
emailed to my clients.



To explain quickly, the results can be viewed by using a form with
cascade filters which filter the information shown on a first report.

This form therefore filters the raw information, and once filtered
enough, allows the user to have more details on the results. This more
detailed report is only different from the first report in the quantity
of data shown, as it refers to the same table.



For example the first report gives the names, and the more detailed
report gives names + adress + organisation details.



So much for the explanation.



What I want to know is how I can export on a single click only
the filtered data and not all the results contained in my results table.
As I use buttons to filters the results and view the details, I'd like
to have a button which, when pushed, transfers the results to the word
document thanks to a VB code.



Does anybody know a similar issue?



Can I use and update the code9.zip posted
http://www.helenfeddema.com/CodeSamples.htmhere, or does
someone know a better code which could be adapted to this task?



Thanks for the help

Cheers



nico
 
Hi

As you know, Helen Feddema's code would be
contained in a Word document. Her code would open
a database to bring data from Access into a Word table.
You have a different situation, ie you want code in an
Access database to do the same thing.

If you could create a query that would select only the
database records you want in the Word document,
then there's a very good way of achieving your aim.
You can write code in the Access database that will
export the data from the query to a hard disc file in
RTF format, then initiate a Word merge between a
Word main document and the RTF file to create the
Word document.

This method is explained in the book "Access
Cookbook" by Litwin, Getz and Baron.

I don't understand how you are "filtering" your form.
And this might be the key to finding a solution.
How exactly are you filtering your form? Could you
construct a query to do the same thing? Food for
thought...

Geoff
 
Back
Top