query with 2 linked databases

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rudeman76
    New Member
    • Oct 2007
    • 58

    #1

    query with 2 linked databases

    Hello,
    I have 2 linked databases. I have one that is emptied into the other at the end of the week. Is there a way I can set up a query that will search both databases and give me the info on a single recordset? for example, In one of my tables I have the user enter in a bag number and tag number. What I want to do is be able to set up a query and have it search both linked tables for the tag number and return it into a single form or whatever. Both Tables will be almost identical, except one is named recievedbags and one is recievedbags1.
    SHould I set up a query or do it programmically (which I am pretty sure I can do).

    Rude
  • jyoung2
    New Member
    • Jan 2008
    • 32

    #2
    you can use a union query in Access I would have your search querys feed into one Union query and then output however you desire. the union would look like

    Code:
    SELECT recievedbags.*
    FROM recievedbags 
    union
    SELECT  recievedbags1.*
    FROM  recievedbags1
    The key to unions is the names of the filds need to be the same. If you are doing Queryies then replace the recivedbags with the name of the Query.



    Originally posted by rudeman76
    Hello,
    I have 2 linked databases. I have one that is emptied into the other at the end of the week. Is there a way I can set up a query that will search both databases and give me the info on a single recordset? for example, In one of my tables I have the user enter in a bag number and tag number. What I want to do is be able to set up a query and have it search both linked tables for the tag number and return it into a single form or whatever. Both Tables will be almost identical, except one is named recievedbags and one is recievedbags1.
    SHould I set up a query or do it programmically (which I am pretty sure I can do).

    Rude

    Comment

    Working...