Results 1 to 4 of 4
  1. #1
    medused is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    2

    building a one to many relationship

    I/m new to Acess 2010. I've built two tables, "customer data" and "customer orders". The primary key is "Customer ID", which is not an autonumber, it's text.


    When I go to the relationship builder and try and joing those tables by using the "customer ID" as the common denominator to join the tables, and I click "enforce relational integrety" it gives me no option to choose other than a "one to one" relationship, when I want a "one to many" relationship, obviously. Any help would be appreciated.

  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,521
    CustomerID isn't the primary key in the orders table, is it?

    By the way, I wouldn't have the spaces in your object names. You'll regret it in the long run.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    medused is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    2
    Quote Originally Posted by pbaldy View Post
    CustomerID isn't the primary key in the orders table, is it?

    By the way, I wouldn't have the spaces in your object names. You'll regret it in the long run.
    ----
    Yes, customer ID is the primary key in orders..... how else could it be done, to joing customers with orders? I don't understand your comment about spaces in my objects names.... what does that mean. Thank you for your help. Bob

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Customer ID can't be the key in orders, or you won't be able to have more than one order for a customer. Normally you'd have an order ID field as the primary key. Customer ID would be referred to as a foreign key in the orders table.

    As to spaces, I mean the space in "Customer ID" for example. I would make it "CustomerID". You'll find when you get into coding and such that the spaces are more trouble than they're worth. You can get away with them but you are forced to bracket them: [Customer ID].
    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. Building Relationship: one to many
    By Keeper in forum Access
    Replies: 1
    Last Post: 04-25-2012, 05:31 PM
  2. Building a FAQ
    By Karin in forum Access
    Replies: 5
    Last Post: 03-07-2011, 11:26 AM
  3. Building a database from scratch
    By kookiethekat in forum Access
    Replies: 1
    Last Post: 01-20-2011, 06:35 AM
  4. Building
    By jlech1805 in forum Access
    Replies: 1
    Last Post: 11-17-2010, 12:10 PM
  5. Building Array
    By jgelpi16 in forum Forms
    Replies: 12
    Last Post: 03-22-2010, 12:33 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