Results 1 to 4 of 4
  1. #1
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451

    queries based on union queries

    ok so I had a problem on https://www.accessforums.net/queries...ery-55723.html and pbaldy helped out tremendously but now moving forward I have a new problem.


    I have a few databases at different locations that I am trying to link into a central database so that the powers that be can see production totals, downtimes, efficiencies etc..
    ok now so far everything is working until I tried using my union queries to create new queries, I get no results? I'm sure that since this is my first attempt at using union queries its something simple and right in front of me. here's what I've done-
    1. used the union query to add the lineID(database location) to each of my tables.
    2. since each locations unique id's start at "1" the unique id's could have duplicates across the locations so in the SQL of the union I trim'd the lineid with a few "0"'s with the unique id to create a new unique id. example, lineid 31 and unique id of 50 trims to "idshift"-3100050

    it all looks great in the individual union queries for each of my 3 union queries when I run them. it pulls up all the locations tables and shows all their data perfectly just like a table would. then the problem starts, when I try to use the union queries together to show something like a shift date that is on the production shift query together with the products produced that is on the produced query I get nothing displaying. what are I not doing????

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Need something to analyze. Post the query SQL statements or provide db. Follow instructions at bottom of my post.

    Cannot replicate issue. I have no problem using UNION query in another query and joining to tables.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    trying to use the 4 union queries to create new queries and do some calculations. just not having any luck. i'm sure its something simple.


    unionQuery.zip

  4. #4
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    I believe I found it. the dates and times were coming across the union as General rather than short or medium. formatted coming into the union and everything so far is working. thanks guys.

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

Similar Threads

  1. SQL: Union Query to Combine 3 Queries
    By pdevito3 in forum Access
    Replies: 6
    Last Post: 06-03-2015, 12:53 PM
  2. Replies: 6
    Last Post: 11-13-2013, 04:17 PM
  3. Union query- 9 Queries
    By JessieBee in forum Queries
    Replies: 3
    Last Post: 07-14-2012, 05:46 AM
  4. A RecordSet based on a Union Queries
    By Paul H in forum Programming
    Replies: 3
    Last Post: 05-31-2012, 02:05 PM
  5. Union Queries
    By tarhim47 in forum Queries
    Replies: 6
    Last Post: 05-26-2011, 12:20 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