Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Nov 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi guys,

    I have a few subdocuments, and each of those subdocuments runs a query that connects to an MS Access database.

    I also have a master document that combines all these subdocuments together.

    None of the queries point directly to a record that is filtered. Furthermore, I plan on creating a subdocument for one of the subdocuments that will query child records for the related parect document.

    I'm just unsure how to pass the Key value to the SQL from one document to the next so that the master document pulls up merged documents all bound to the same key value.

    Anyone have any ideas how to do this?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    This sounds like a job for a report with subreports in Access.

    I don't think you can run multiple mail merges in a master document in Word, so if you really need to do this in Word, you may have to write code to perform separate mail merges, save the merged documents and assemble them into a new document.

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    I don't fully understand what you are doing.

    I have used custom document variables with Master / Sub documents in the past, and the variable defined in the master document takes precedence over the one from the sub document. You may be able to use this to achieve your goal.

  4. #4
    New Lounger
    Join Date
    Nov 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey guys,

    So I figured out that you can program in common field names, for example {First_name} {Last_name} in to the sub documents of the page from the master document. This will even save all the changes made to the subdocument files.

    If its done this way, you can use one data source to merge all the fields across the sub-documents. This is a way for each subdocument to share the data from 1 record of 1 data source. Which will give me closure on a big piece in my original question.

    I guess what I need now is a way to filter records in a ms word subdocument (sort of what you were talking about HansV, a very common practice in reporting, in fact all it is establishing a simple grouping level).

    Does anyone have an ideas on how to report more than 1 record from MS word? is it even possible without extensive VBA?

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Perhaps you can use macropod's tutorial Word 97-2007 Mailmerge Tutorial: Create Sorted Listings. It shows how you can group records in a mailmerge.

  6. #6
    New Lounger
    Join Date
    Nov 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, you've helped me before.

    Thanks a bunch.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •