Perry
Mon Jan 05 17:01:18 CST 2004
As stated in one of my previous msg's, I would use
a (precompiled) query in your Access database.
In this query (say: MyQuery) y can make all sorts of joins between
the tables present in your database.
Once the query is designed and the output is according to yr wishes, you can
use this query as datasource to yr Mailmerge object in Word.
SQL statement of which wud read something like:
"select * from MyQuery"
or even
"MyQuery"
If you need assistance in designing the MS Access query,
kindly request consult in newsgroup:
microsoft.public.access.queries
Krgrds,
Perry
"AndyK" <anonymous@discussions.microsoft.com> wrote in message
news:74F5EF45-2B3C-4EF6-9523-AFE6A06C88D4@microsoft.com...
> hi Perry thanks for responding. My data structure looks like this, data
from these *tables* needs including in the document:
>
> *Invoice* covers many *Sessions*
> *Invoice* has many *Adjustments*
>
> So for example my data to include in the Word doc could be:
>
> Invoice Total = 60.00
> Invoice Date = Jan 04, 2004
>
> Session 1 Charge = 10.00
> Session 1 Date = Dec 15, 2003
> Session 2 Charge = 15.00
> Session 2 Date = Dec 21, 2003
>
> Adjustment 1 Amount = 15.00
> Adjustment 1 Type = Balance from previous
> Adjustment 2 Amount = -8.00
> Adjustment 2 Type = Payment
> Adjustment 3 Amount = -10.00
> Adjustment 3 Type = Payment
>
> Forgive me my SQL skills are basic - so does the SQL statement feature
allow me to get all these datasets for inclusion in the MailMerge object?
>
> thanks again for responding!
>
> rgrds
>
> andy
>
> ----- Perry wrote: -----
>
> Look at
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbawd10/htm
> l/womthcreatedatasource.asp
>
> Note specifically : SQLStatement property with which you can assign a
> complex SQL statement
> covering multiple (relational) tables/queries.
>
> Krgrds,
> Perry
>
> "AndyK" <anonymous@discussions.microsoft.com> wrote in message
> news:06BB51BE-A46D-4BED-BFF9-A09CB0D98E29@microsoft.com...
> > ...use my VB6 application to create a series of Word documents from
a
> template - some fixed text, and some variable text from a database?
> Variable data is held in about 7 different related tables; I looked
at
> Mailmerge, but it looks to me like it only accepts a single table or
query,
> which seems to rule this out...?
> >> If someone could point me in the right direction that would be a
great
> help.
> >> Regards
> >> andy
>
>
>