1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

How to stop auto change of data in the table?

Discussion in 'Business Applications' started by CinBar, Mar 28, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. CinBar

    CinBar Thread Starter

    Joined:
    Jan 15, 2008
    Messages:
    54
    Dear all,

    I am attaching my DB.

    The problem I'm facing is that in the Course_Details table, the first record in the Course_ID field keeps changing it's data without any reason.

    Hence, it affects the combo box in the forms when I click on the Course details, course & cost report button on the switchboard.

    Qns: What's the reason for the auto change of data in the table?

    Thanks a lot!
     

    Attached Files:

    • Now.zip
      File size:
      177.4 KB
      Views:
      10
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Somehow the Related ID field is being set to Null (contents deleted). I have been using Access for nearly 10 years and did not realise that you could set a field in a relationship to null and it not be against the Relationship Integrity rules. You cannot put any other text or number in such a field without it conflicting Integrity.
    To overcome this set the related field's "Required" property to "Yes".
     
  3. CinBar

    CinBar Thread Starter

    Joined:
    Jan 15, 2008
    Messages:
    54
    Thanks OBP, it solved the problem when I changed the Course_ID field to required in the Course_Details table. However, whenever I need to close the Enter_Course_Details form, there'd be a error message, "You cannot add or change a record because a related record is required in table 'Course'. So I checked the data in the tables, there isn't anything missing, so is there any way I can avoid this error message?
     
  4. CinBar

    CinBar Thread Starter

    Joined:
    Jan 15, 2008
    Messages:
    54
    Dear all,

    I'm at my wits end. Pls help! Thx!


    Database 1 contains data in Course table. It also contain some data in Student_Profile table. The first record has the data (Physical) in the Disability_Type field.

    Problem 1 & 2)
    In Database 2, I entered some data into the Course_Details table using the Enter_Course_Details form. After that, when I opened the Student_Profile table, the first record in the Disability_Type field is blank. Problem 1) Only the first record. Prob 2) Whenever I'm closing the Enter_Course_Details form, it will show the message "You cannot add or change a record because a related record is required in table 'Course' ". This message only appears after I change the Course_ID field in the Course_Details table to required.


    Problem 3)
    In Database 3, I entered some data into Stud_Attend_Courses table using the Stud_Attend_Courses form. Problem arises when I click on the Cost_Report_Form, and I choose BCF1, it will return me duplicate results even though my SQL in Cost_Report_Query query states SELECT DISTINCT ....

    I'll only faced this problem when I entered in the Stud_Attend_Courses form and the Course commerce date combo box has more than 1 option. For example, I will not have problem when in the form, I chose BDBF as the Course Code, and there is only 1 course commerce date (E.g.: 14/01/2008). After saving, I can view what I have entered using the Cost_Report_Form. It don't show me duplicate records.


    But if in the Stud_Attend_Courses form, I chose Course Code: BCF1, the Course Commerce Date will show 3 dates in the combo box. I can chose one of the dates and save in Stud_Attend_Courses table. But when I use the Cost_Report_Form to check what I have input, it will show a duplication of records. This is even so when my SQL has SELECT DISTINCT ....


    Thank you and pls help. If there is any other area, I can improve on, pls advise. Thanks!
     

    Attached Files:

    • 1.zip
      File size:
      180.4 KB
      Views:
      3
    • 2.zip
      File size:
      179.9 KB
      Views:
      3
    • 3.zip
      File size:
      192.7 KB
      Views:
      3
  5. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    CinBar, do we need all 3 databases, or are all the problems in the 3rd one?
     
  6. CinBar

    CinBar Thread Starter

    Joined:
    Jan 15, 2008
    Messages:
    54
    Yes, all the problem are in DB 3. But jux in case, u want to refer, DB 1 & 2.
     
  7. CinBar

    CinBar Thread Starter

    Joined:
    Jan 15, 2008
    Messages:
    54
    Hi all,

    Is there anyone who can solve these problems? Thx a lot!
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/697866

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice