Results 1 to 7 of 7
  1. #1
    finatrick is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2018
    Posts
    4

    Trying to relearn access and running into a problem already

    I'm trying to get back into using access again after several years and I'm having trouble. In order to get reacquainted to the program, I'm following the steps from the Step-by-Step book by Microsoft I just stated and I'm already having issues and hope someone can help me. In the book, I am asked to create a relationship between three tables. I followed the steps to the T but referential is violated even though I change the field to what it is supposed to be according to the book.



    For those not familiar with the book we I was asked to create an Employees, Customers and Orders table. The first two tables having one or two records(since I just started with the book) and the Orders table containing the foreign keys to each table. Long story short, when I try to enter the correct number that would reference the field in the employee table and try to leave, I get the integrity field error.

    I've attached a word document of screenshots of the relationship and the tables along with the error.

    I double tried this exercise and can't figure it out. Can someone help?
    Attached Files Attached Files

  2. #2
    redekopp is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2015
    Location
    Saskatoon
    Posts
    108
    I am assuming its a field join issue, I tried it with and without checking enforce referential integrity, and making the join type 2 for both from customers > orders and employees > orders. Seems to work.

    Give that a try.
    Attached Thumbnails Attached Thumbnails help.PNG  

  3. #3
    finatrick is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2018
    Posts
    4
    Thank you for the quick reply redekopp. I did what you suggested bye removing referential integrity and I was able to enter the number that points to the correct employedd id. Thnk you for that. However, isn't unchecking referential integrity problematic and can cause issues down the road?

  4. #4
    finatrick is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2018
    Posts
    4
    Thank you for the quick reply redekopp. I did what you suggested bye removing referential integrity and I was able to enter the number that points to the correct employedd id. Thnk you for that. However, isn't unchecking referential integrity problematic and can cause issues down the road?

    For instance, I was able to enter the correct value(1) but I was able to enter 11 which was also accepted. In the book I was told in the step to enter 11 in order to show the use of checking the integrity box. Given the current database size I'm working with unchecking might not by an issue but I can see how checking that box can be useful when working with larger databases.

  5. #5
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Your picture shows a 0 in the employee field; was that the value you tried to use? If so, did it exist in the employee table? The error implies that whatever value you input into the orders table did not exist in the employee table at that time.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    finatrick is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Oct 2018
    Posts
    4
    Hi Paul thanks for responding. I figured it out. Since both relationships contain referential integrity, I have to fill out both fields. Thank you guys both.

  7. #7
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    No problem and welcome to the site!
    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. Replies: 3
    Last Post: 05-30-2015, 02:57 PM
  2. Problem running Access 2000 database in Office 2007.
    By pmacafee in forum Programming
    Replies: 1
    Last Post: 07-13-2012, 11:12 AM
  3. MS Access 2003 running 64 bit system problem
    By stan_the_man21ph in forum Access
    Replies: 3
    Last Post: 09-14-2011, 10:52 PM
  4. Running Cmd problem
    By timpepu in forum Programming
    Replies: 3
    Last Post: 04-09-2010, 10:04 AM
  5. Running Sum Problem in Query and Chart
    By sandyg in forum Access
    Replies: 0
    Last Post: 12-01-2009, 01:02 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