Results 1 to 8 of 8
  1. #1
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88

    Two into One (Tables)

    I have a DB to track my video games. I would like to display both my console and portable games into one form/datasheet. I have a query where both tables are linked in the games field but only the console games show. both fields have the same name (Games). What am I doing wrong?

  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,652
    Unless they have very different fields, you should have one table with a field to denote which type it is. Failing that, you need a UNION query to pull them together.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Why do you have two tables? Are the fields really different? If not, use 1 table with another field to describe as portable or console.

    You were linking these two tables to each other? You are linking on names? I assume both tables don't have all the same game names in each.
    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.

  4. #4
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Quote Originally Posted by pbaldy View Post
    Unless they have very different fields, you should have one table with a field to denote which type it is. Failing that, you need a UNION query to pull them together.
    Thnx! I figure out the UNION query and this is what I have...

    SELECT [Games],[ConsoleName],[Copy],[Condition]
    FROM qryConsole_Main
    WHERE InCollection = True

    UNION SELECT [Games],[ConsoleName],[Copy],[Condition] AS'ViewOnly'
    FROM qryPortable_Main
    WHERE InCollection = True
    ORDER BY (ConsoleName), (Games);

    It works great! The only thing I haven't figure out is how to add the already checkboxes in the table (true or false) into the SQL.
    Last edited by ortizimo; 10-02-2017 at 09:09 AM.

  5. #5
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Quote Originally Posted by June7 View Post
    Why do you have two tables? Are the fields really different? If not, use 1 table with another field to describe as portable or console.

    You were linking these two tables to each other? You are linking on names? I assume both tables don't have all the same game names in each.
    they are basically the same thing...the only reason is that I need everything to be separated to get clear results and datasheets that have no other data in them...

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    They should be in one table. Using query criteria you can easily get one, the other or both.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    ortizimo is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2017
    Location
    FL
    Posts
    88
    Quote Originally Posted by pbaldy View Post
    They should be in one table. Using query criteria you can easily get one, the other or both.
    I have tried but when I make a separate query just for the hardware it counts all the records of my games in that same table and displays them as blank. This is why Im trying this.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Personally I would correct that problem rather than design around it, but it's your baby.
    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: 2
    Last Post: 09-28-2017, 06:56 PM
  2. Replies: 2
    Last Post: 07-15-2014, 10:39 AM
  3. Replies: 1
    Last Post: 12-11-2013, 01:18 PM
  4. Replies: 4
    Last Post: 11-22-2013, 11:20 AM
  5. Replies: 10
    Last Post: 07-12-2011, 11:09 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