J
jojo the clownfaced warthog
I've got a document consisting of several chapters, each of
which have been broken out into their own document.
I've got an access database, listing customers and the
chapters they are to be provided.
What I -don't- have (and can't seem to find anywhere, having
tried in vain at MS's site and a hundred different programming
sites) is a way to query the database from within Word.
I have two tables, Customers and CustomerChapters (actually
I have more, but these two will do for now).
Customers contains:
1. CustomerID
2. CustomerName
CustomerChapters contains:
1. CustomerChapterID
2. CustomerID
3. ChapterID
4. OrderOfAppearance
What I want to do:
1. Query the Customers table for all customer names.
2. Present all customers in a pop-up window with a
drop-down list. (steps 1 and 2 are optional; I could
just type in the customer ID in the macro, but we're
dreaming big, here ) ).
3. Query the Customers table for all chapter IDs
belonging to the selected (or specified) CustomerID.
4. Retrieve the first word doc identified by the retrieve
in step 3 (as arranged by OrderofAppearance).
5. Append the next word doc, and the next, 'til the end.
I know the SQL code, so that's not too much of a problem.
What I need (long time to come to a point, huh? ) ) help
with is the VBA code, particularly for steps 3 and 4.
Can anyone help?
Thanks!
-Jon
which have been broken out into their own document.
I've got an access database, listing customers and the
chapters they are to be provided.
What I -don't- have (and can't seem to find anywhere, having
tried in vain at MS's site and a hundred different programming
sites) is a way to query the database from within Word.
I have two tables, Customers and CustomerChapters (actually
I have more, but these two will do for now).
Customers contains:
1. CustomerID
2. CustomerName
CustomerChapters contains:
1. CustomerChapterID
2. CustomerID
3. ChapterID
4. OrderOfAppearance
What I want to do:
1. Query the Customers table for all customer names.
2. Present all customers in a pop-up window with a
drop-down list. (steps 1 and 2 are optional; I could
just type in the customer ID in the macro, but we're
dreaming big, here ) ).
3. Query the Customers table for all chapter IDs
belonging to the selected (or specified) CustomerID.
4. Retrieve the first word doc identified by the retrieve
in step 3 (as arranged by OrderofAppearance).
5. Append the next word doc, and the next, 'til the end.
I know the SQL code, so that's not too much of a problem.
What I need (long time to come to a point, huh? ) ) help
with is the VBA code, particularly for steps 3 and 4.
Can anyone help?
Thanks!
-Jon