Page 5 of 5 FirstFirst 12345
Results 61 to 64 of 64
  1. #61
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,863
    You need proper primary and foreign key assignments.

    When I looked at your DB it did not have any. Each table needs a primary key. It should be an Auto number. You can choose a Long Integer also. You can have up to 2 million records using a long, actually a little more.



    Spend some time looking at the sample DB I uploaded in the other thread. It has examples of how to create relationships and use them in a query.

    After you spend some time assigning Primary Keys to your Tables and giving your tables the ability to store the values of other table's primary keys, you need to start building queries. After you practice with the table relationships, build a query. After your queries don't work how you want. Go back to redesigning your table structure and try again.

  2. #62
    Knelou is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    45
    Okay so I tried creating PrimaryKey, as in your example Bindler_sample and tried the relationship beetween table "All stoppage Codes" and "Bindler Timings and DT". However, and maybe it's because in the query I added Sum in "Total" row to sum all my fields, but when I create the relationship, suddenly there is no data showing in datasheet view (only the name of the fields). Is this normal?
    Also, I don't really see how PrimaryKey will help me to solve my problem in post #59-60... I will still not have in Pivot Table the Total for my UDT_ProOther2, I think?

  3. #63
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,863
    Primary keys need to have relationships with foreign keys in other tables.

    Nothing else in the world of Relational data bases matters without this. You will have now way to query relative data if there is not a relationship.

    Back to post #61



    .

  4. #64
    Knelou is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2013
    Posts
    45
    Database_Chocolate_Tree_Bindler1 - Copy.zip

    Okay, I did exactly all what you said. See in my db attached, in the Bindler_timing_and_DT_query, you will see that I have created relationships but no data is shown. If I delete the table All_Stoppage_Codes, (delete the relationship automatically) the data appear again in datasheet view. Please tell me what's wrong in my db...

Page 5 of 5 FirstFirst 12345
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Problem with IIF function
    By donnysl in forum Queries
    Replies: 3
    Last Post: 08-12-2013, 10:11 AM
  2. Replies: 10
    Last Post: 02-09-2012, 04:42 PM
  3. Compile error: code or function not defined
    By GeorgeBrown in forum Access
    Replies: 1
    Last Post: 09-19-2011, 10:25 AM
  4. Problem with IIF function
    By Hulk in forum Forms
    Replies: 3
    Last Post: 03-20-2011, 12:59 PM
  5. VBA Function problem
    By smikkelsen in forum Programming
    Replies: 5
    Last Post: 07-16-2010, 07:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums