Results 1 to 7 of 7
  1. #1
    playtime38 is offline Novice
    Windows 10 Access 2007
    Join Date
    Dec 2015
    Posts
    7

    reloationships


    When making a relationship in a connected table do you simply copy the Performers ID from top of that table and make the same field in the Songs table down the list with the field value as number?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    How about telling us about your proposed database. What is the subject matter, and what's involved?

  3. #3
    playtime38 is offline Novice
    Windows 10 Access 2007
    Join Date
    Dec 2015
    Posts
    7
    Maybe this question should have come under queries?

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    A relationship is not really something tangible. It is more of a concept. In Access, you can define relationships in the Relationships Window. In order to define a relationship in the Relationships Window, you need at least two tables. In one table you will need a column defined using a field name and you will need the same in the second table. In order to define a relationship, both columns need to be the same data type. It is common to use an Autonumber as the Primary Key and a Long Integer as the Foreign Key. These are considered compatable data types for a relationship.

    Additional constraints can be managed vie the Properties of a Relationship, like enforce referential integrity.

  5. #5
    playtime38 is offline Novice
    Windows 10 Access 2007
    Join Date
    Dec 2015
    Posts
    7
    It's okay Orange - was really testing how to ask a question on this forum and I see now one should look at all the sections on the access forum and post it to the one you think it applies to - and to give more detail on what you are workikng on. I am learning of Lynda access 2007 and the movie did not explain how the relationship was made and it wasted a day of my time trying to figure it out. Thanks for you quick reply

  6. #6
    playtime38 is offline Novice
    Windows 10 Access 2007
    Join Date
    Dec 2015
    Posts
    7
    oh i see that key i refer to in the songs table is a foreign key. I just copied from lynda movie and they had it in as number - should it really have been intger? Also this is showing me how to follow threads - i dont reply as new item but open the answerer like yourself and post reply there - thanks a lot

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    should it really have been intger?
    While in design view of the table, the data type will, typically, be Number for Foreign Keys and will be Autonumber for Primary Keys.

    Having said that, there are different Field Sizes for the Number type. Closer to the bottom of the window, while in design view of your table, you will see various properties. If you select the field (tpwards the top of the window) that is the data type, 'Number', you can view its properties (towards the bottom of the window). One of the properties is the Field Size. Long Integer is the appropriate Field Size for Foreign Keys Related to the AutoNumber type.

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

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