How to stop auto change of data in the table?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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!
 

Attachments

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".
 

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?
 

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!
 

Attachments

OBP

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

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.
 

CinBar

Thread Starter
Joined
Jan 15, 2008
Messages
54
Hi all,

Is there anyone who can solve these problems? Thx a lot!
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top