Relationship and Refresh Problem

Haynesey

Registered User.
Local time
Today, 07:42
Joined
Dec 19, 2001
Messages
190
I am designing a call logging database. I have a Computer Users table that is linked using a 1 to many relationship to a call logging table. On the call logging form, there is a button, that opens the Computer Users form to add new users to the database. However, in order for the combo box containing the user details on the call logging form to update, I refresh on close of the users form using the following code.

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

This works fine when data is present in the open record on the call logging form, but if I try to create a new record using the call logging form, then want to add a new user, and close the form to update the user combo box, the following message appears and doesn’t update unless I close the form and reopen it.

“You cannot add or change a record because a related record is required in the Users table!”

Any ideas? Please help.

Thanks in advance

Lee
 
Lee,

This sounds like totally correct behaviour in making sure firstly that the integrity of your data is not under threat and that every job is allocated.

The short term cheap way around it would be remove the integrity barrier however this put you on the well travelled path to unreliable data.

The second more credible alternative is create a dummy user to be used until the user has been added then edit the record reallocating to the correct individual.

Better still, this sounds to me like you need to check if the user is on the system before entering the job - change the workflow to ensure the inputter selects an existing user before even opening the job form.
 

Users who are viewing this thread

Back
Top Bottom