Results 1 to 3 of 3

Thread: Relationships

  1. #1
    Join Date
    Aug 2003
    Posts
    160

    Unanswered: Relationships

    Hi! I am fairly new to access.

    I have one table with fields CustomerID(primary key),Lastname,Firstname, Address.

    I Have one more table with fields OrderID(Primarykey), CustomerID, Equipment received, Problem.

    In the relationships window I included both tables, after that I drag CustomerID from customer table to CustomerID in order table.In the window I chose referential integrity option.

    Some times it is creating one-to-many relationship and some times it is creating one-to-one relationship,and sometimes it is giving me an error like can not create relationship because referential integrity failed order table.

    On the other hand I have one more tabe like Orderdetails, the fields are OrderID(primarykey same as in order table),Techname, Serviceperformed,Timetaken.

    While i am creating relationship between Ordertable and order details table It is giving me one to one relationship but I want One to many Relationship. How Can I create a One to many relationship.

    I think I gave Enough information. If need some more detail information feel free to Ask me.

    Thanks.........
    Vad

  2. #2
    Join Date
    Mar 2003
    Location
    Atlanta, GA
    Posts
    191
    Your order table and order details table both list the orderid as a primary key, which means that there can be no duplicated data in that field in the tables....

    If you want a one to many relationship... the order detail table should not use the orderid as a primary key.

    Tim
    Tim

  3. #3
    Join Date
    Aug 2003
    Posts
    160

    How can I make A History Table

    How to create a history table for the above tables. Do I Need to create any relationships between The primary table and the history table.

    The History Table is for Storing the Completed orders. The History Table contains All the details of Customer Table, Order Table, Order Details Table.


    Thank U!
    Vad

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •