Results 1 to 6 of 6
  1. #1
    Erictsang is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    154

    How to set the relationship

    Dear all




    I have a huge file that contains the following 42 fields See attached

    I want to split them into few small tables and convert into forms

    I need to join them up.

    Am i right that i need to use the ID field for all the spiltClick image for larger version. 

Name:	Capture.JPG 
Views:	13 
Size:	38.6 KB 
ID:	29819 files into to join them

    I tried but Access prompt for iNDEX key and also alert me that the Primary key should not be null value

    Appreciate your help, it would be my first project. i was told there are around 5000 records

    eric

  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,930
    Why split into separate tables? If the records will have 1-to-1 relationship might as well remain as a single table. Then instead of multiple subforms, have a single form with fields distributed on pages of a Tab control.

    FULLNAME should really be split into several fields. Name parts should be in separate fields - LastName, FirstName, MidName, Title, Suffix.
    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
    Erictsang is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    154
    June 7

    Sorry, i do not understand.

    The reason i split the big table of 42 fields (in fact more than that) . So i want to break it into few tables

    So it is not wise to break it into small tables?

    What do you mean by tab control ?

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Glancing at your graphic there appears to be no reason for a second, related Table, and using one will only add work for you.

    If one of your Fields could have multiple Values, say you had a field for academic degrees, and the Values could be BS in Biology, MS in Microbiology and PhD in Epidemiology, then yes, you'd need a second Table and it would be linked/related by way of the ID Field...it being the Primary Key for the Main Table and the Foreign Key for the 'degrees' Table.

    A Tabbed Control is a Control on a Form that has a large number of Controls, where you can place the Controls that hold the data from Fields in a logical manner, i.e the yellow, green, blue and gray groups of Fields each on a different page. It's a device for not only displaying data in a logical way, but saves 'real estate' when you have a lot of Fields, such as you do.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I think you might well consider splitting a few tables out of the main table... I would look at normalizing the structure.

    Fields 3 - 6 (yellow) seem to be about a person.
    Fields 15 - 24+ (blue) seen to deal with flights.

    Fields 12 - 14 - the names seem to be data & not good field names. Maybe a better name would be Places.

    Other fields?????


    My $0.02.......

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Whether or not to split depends on data relationships. Can each person have more than one flight?
    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.

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

Similar Threads

  1. Replies: 3
    Last Post: 03-19-2015, 05:26 PM
  2. Replies: 1
    Last Post: 12-06-2014, 12:49 PM
  3. Relationship Help?
    By Ritequette in forum Access
    Replies: 3
    Last Post: 10-05-2012, 06:18 PM
  4. Replies: 5
    Last Post: 11-30-2011, 07:02 PM
  5. one to many relationship?
    By cowboy in forum Access
    Replies: 3
    Last Post: 06-16-2010, 02:37 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