Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2008
    Posts
    5

    Unanswered: Query 2 tables in a database for Word

    I hope my title makes some sense!

    I am a volunteer for a small charity and I created a new database for our members. There are 3 tables within the database but at the moment I want to create a document in Word that will mail merge using the info from 2 tables.

    The current layout is that address information is in one table and actual member info is in another, this is linked with a relationship between the ID key in the address table with an address index in the member info table. It looks a bit like this:

    Address table

    ID Surname Address 1 Address 2 ...
    1 name1 data data
    2 name2 data2 data2

    Member Info

    ID AddressIndex Name Surname ....
    1 1 name name1
    2 1 name name1
    3 2 name name2

    I hope that makes sense, when I press the plus sign next to the records in the address table it shows all the members in that household.

    What I want is to create an update form that I would send out every year to make sure the info is correct. The problem I have is how to query the database to bring up the one address but also call up the members in the household.

    I hope I have explained this clearly, any help at all will be greatly appreciated!!

  2. #2
    Join Date
    Mar 2008
    Posts
    5
    If anyone could help that would be really great, Im looking for some kind of direction as at the moment I don't know what to do!

    Is there anything that needs to be explained?

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Seems pretty easy... all you need to do is make and save a query that gives you the data you want and then use Word to connect to that query.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Mar 2008
    Posts
    5
    how would i make a query listing only the members of the household?

    Say for example that a household has 4 members. Wouldn't the query make each member a record and so in word would show up as 4 different members instead of 4 on the same page?

    I looked at the way it was done before using a report but for some reason when I make a report it goes on indefinately, instead of one page per household. Not too sure how to resolve that, I made a form for inputting the data in which I had the main form for the addresses and a subform for the members living there - how could I connect this info to word, or into a report maybe?

    Thanks for the help so far!

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Quote Originally Posted by ThaDon
    how would i make a query listing only the members of the household?

    Say for example that a household has 4 members. Wouldn't the query make each member a record and so in word would show up as 4 different members instead of 4 on the same page?
    Yes it would. This is why I don't use Word much Access reports can deal with it.

    Quote Originally Posted by ThaDon
    I looked at the way it was done before using a report but for some reason when I make a report it goes on indefinately, instead of one page per household.
    Group the report by household. Use a Force Page Break: After Section for the household footer.

    Quote Originally Posted by ThaDon
    Not too sure how to resolve that, I made a form for inputting the data in which I had the main form for the addresses and a subform for the members living there - how could I connect this info to word, or into a report maybe?
    That's the other way to do it... you can design a mainreport and subreport in exactly the same way as you do for forms

    Quote Originally Posted by ThaDon
    Thanks for the help so far!
    You're welcome
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Mar 2008
    Posts
    5
    Thank you very much for this!

    I will work away and see what happens, the help has been very much appreciated!

  7. #7
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You're welcome

    Good luck!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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