Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    grewpar is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    13

    Interconnecting data help

    Hey guys!



    I have multiple tables, and they all have different data except for one column of "Report Keys". I'm trying to connect simply the report keys from each each table so that I can have all of the data connected and organized based on the report key. I could manage this on excel somehow, but I'm new to Microsoft Access and despite much personal inquiry, I cannot figure it out.

    Any help is appreciated!

    Thanks

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Is "Report Keys" the Primary Key in one of the tables.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    grewpar is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    13
    I actually didn't know what a primary key is until I just looked it up. I don't have anything set as a primary key. Is this how I would interconnect the data?

    Thanks for the help so far!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Do you want to provide db for analysis? Follow instructions at bottom of my post.

    Yes, primary and foreign keys is how tables are related (hence the term 'relational database').
    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.

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    I suggest you search google for pages on database design/structure. Here's one I found: http://office.microsoft.com/en-gb/ac...#_Toc270678227
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #6
    grewpar is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    13
    Okay so I have been doing some research so that I don't waste everyone's time. So I have set report keys as the primary key. I have also set up a relationship between the report keys between all six tables....Now that the relationship has been established, how do I use this to view all of the info for one report key at once? Or what features have I unlocked by creating a relationship?

  7. #7
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Can you post a screen shot of the Relationships
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  8. #8
    grewpar is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    13
    Quote Originally Posted by Bob Fitz View Post
    Can you post a screen shot of the Relationships
    Here's a screen shot.

    Click image for larger version. 

Name:	Capture.PNG 
Views:	8 
Size:	31.3 KB 
ID:	17857

    For each report key there is data, however the data is separated into tables, I'm trying to see all of the data for each row/report key consecutively. Are relationships the wrong way to approach this?

    And by the way, I really appreciate all of your guys' help so far.

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    What is the data type of each table's Report_Key field? Cannot link on autonumber fields.

    Why do you have manufacturer address info in two 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.

  10. #10
    grewpar is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    13
    The data type of each Report_Key field is "Long Integer" I believe. Also the manufacturer address info is in two tables for reasons unknown, so I'm keeping the data just in case, it may be slightly different for some report keys, however I can't look through 1.2 million lines to verify.

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    These tables have 1-to-1 relationship? Will there always be related records in both tables. If yes and yes, why not one table?

    Why do tables have year in their name? What is the third table with Field2 and Field6 for?
    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.

  12. #12
    grewpar is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    13
    Yes these tables have a 1-to-1 relationship, however one may have more report keys than another. All the data isn't in one table because I didn't create it, and perhaps because all of the data would exceed 2 GB of space. I most definitely would have put it in one table! The years indicate the span of time that each report key belongs to.

    Summary of tables:

    Leftmost: This table contains every single report key ever created, I just deleted all of the keys besides the 2012-2013 because that's the only data relevant to what I'm doing.

    Middle: This table has every device name and manufacturer associated with every report key, which the leftmost table does not have.

    Rightmost: This table contains the report key, and a description of a malfunction for the corresponding devices....

    All tables contain unique things, which is why I need all three. The first will help me verify that I'm not missing any report keys in the others....which I probably am, hence its importance.

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    With 1-to-1 relationship, data all in one table doesn't make any difference about file size if the empty field is Null and not empty string. I never allow empty strings in 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.

  14. #14
    grewpar is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2014
    Posts
    13
    Well there were three separate .txt files, and I'm not sure on how to combine them while keeping all the report keys/rows in sync.

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Options:

    1. Create the necessary fields in the destination table. Use query builder to join the tables then switch to UPDATE query and set the UpdateTo criteria. Run the query.

    2. Create a query that joins the tables then switch to MAKE TABLE and run. If you are happy with the new table, delete the originals.
    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.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 12-21-2011, 02:11 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