Results 1 to 4 of 4
  1. #1
    cedricleo is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    2

    Relationships problem


    I have a table Firms_data(Firm_name, Address, Phone, Email, Fax, Financial_Data). Now, some firms can have more phone numbers, emails, fax numbers. I want to put these infos in separate tables, so i'll have the "phones" table, the "emails" and the "fax" one. How can i link the table Firms_data to the others. I found out that i can only link one field from the first table with only one table. how can i link the table with all the others?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Your Firms_data table should have a PrimaryKey (PK) field. It would be nice if it was an AutoNumber field. Each of the other tables should have a ForeignKey (FK) field set to LongInteger if the PK of the 1st table is an AutoNumber. This field will contain the PK of the 1st table so you can maintain the 1:m relationship. Assuming you use a MainForm/SubForm to view/edit the data then Access will fill in the FK for you as you will have used the two fields as your LinkChild/MasterFields properties.

  3. #3
    cedricleo is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2011
    Posts
    2

    so far....

    i won't use the access forms. i'll program an interface in Visual Basic.Net.
    So far i made a PK, the field "CUI" (it is not an autonumber, so i'll have to update it with code). CUI will be FK i the other tables. Now, is there a possibility to see all the tables assigned to the first table when i press the + sign of a record in Datasheet view? Does Access show only one table at a time there, and i have to choose other table when i need it, from the insert menu?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Your last sentence is more or less correct.

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

Similar Threads

  1. Relationships I think
    By darlaj5 in forum Access
    Replies: 2
    Last Post: 05-04-2011, 08:37 PM
  2. Relationships
    By bopsgtir in forum Database Design
    Replies: 1
    Last Post: 01-10-2011, 12:44 PM
  3. Relationships again
    By BarbT in forum Access
    Replies: 2
    Last Post: 11-09-2010, 04:12 AM
  4. One to many relationships
    By CoachBarker in forum Database Design
    Replies: 1
    Last Post: 09-13-2010, 09:01 PM
  5. Too Many Relationships
    By MikeT in forum Database Design
    Replies: 4
    Last Post: 08-25-2010, 07:23 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