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 said:
...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...?