Results 1 to 5 of 5
  1. #1
    Kelrizzo is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    3

    Exclamation Query several databases to UPDATE one

    I've been searching the forums but haven't found a specific answer to my question. It could just be ignorance on my part.

    I have 14 databases, each with tables that have identical fields. All the tables have a unique employed identification number acting as the primary key, there will be no duplicate key found between any of the databases.

    It was necessary to have separate databases so that workers on the same LAN could update their own particular databases at one time.

    I want to bring all this data together into one database so I can extract meaningful data about the project as a whole. I've been trying to figure out how to do this for several days, and I'm just spinning my wheels.



    Mike

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Quote Originally Posted by Kelrizzo View Post
    It was necessary to have separate databases so that workers on the same LAN could update their own particular databases at one time.
    The problem you're having illustrates why this likely shouldn't have been done. There are ways to let users update their own data in a single database. At this point you can create a database that links to all the other databases, and create a UNION query to draw the information from all of them.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Kelrizzo is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    3
    Aye, I played the back-end/front-end game for a while, but it just wasn't working. People could not save while another person was in the database.

    I did try to link the databases, but when I executed it to append everything into one database, the thing ended up being over 500 MB in size and it was still compiling. Obviously I did something wrong lol

  4. #4
    Kelrizzo is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2011
    Posts
    3
    This is getting nuts.

    I've linked all the tables under one database. The append query is what I want to do, but using that I can only make use of one table, when I try to do more than one Access wants a relationship, but there are no relationships.

    Every database represents a unit with military members at it and their status in a project. There are 14 units. Each record has a number of fields, but the only ones I care about are the Department Name, ID number, Name, and Status.

    Adding all 14 units to the Query in Design View and moving the same 4 fields from each linked table into the query results in a infinite loop of some kind where every table repeats it's data ad naseum.

    I can append one table into my newly created table (Appended_Tables), but of course now I have 13 other tables which I can't do anything with.

    I've tried to code a INSERT INTO SQL statement in SQL view, but that's not working. I even attempted a code module, which was fun, but hooray for macro disabling, I can't determine if it will work or not becaue my workstation is disabling macros.

    It seems that it should be a simple process to take identical tables (even if they are linked tables) and append the data from each table, one on top of the other. I'm not that smart though, I just steal what other people have done.

    Anyone have any advice for the frazzled?

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Like I said, a UNION query:

    SELECT Field1, Field2
    FROM Table1
    UNION ALL
    SELECT Field1, Field2
    FROM Table2
    UNION ALL
    ...

    A UNION query can only be created/maintained in SQL view by the way. If this is a one-time thing, you should also be able to run an append query for each table into a single table, providing the keys are different, which you said they are.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-07-2011, 03:17 PM
  2. Replies: 4
    Last Post: 01-04-2011, 06:30 PM
  3. Replies: 6
    Last Post: 09-30-2010, 11:12 AM
  4. append query for multiple databases
    By vasto in forum Access
    Replies: 0
    Last Post: 09-24-2009, 08:34 AM
  5. VBA SQL Query of Multiple Databases
    By VBA_Rookie in forum Programming
    Replies: 0
    Last Post: 12-02-2008, 12:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums