need help on form

plgii

Registered User.
Local time
Today, 12:19
Joined
Apr 13, 2006
Messages
15
please see example code
when I click close button from second combo or change to other tab page I get 3201 error. I do have Referential Integrity on, but need to get rid of the error.
Can anyone shed some light on this?
 

Attachments

Your are getting the error because you are entering data into the Charge-type-id using the combo box, then your code saves the record and there is not record in the driverid.

If you look at your table job-charges you will see that you have driver_id set to Required = Yes.

This is what is causing the problem: (why do you need to save the record after this combo updates?)
Code:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Why you have this code - after update Charge-Type-ID is a mystery to me.
If the combo is enabled = false what does locking it do?
Code:
Me.Combo11.Enabled = False
Me.Combo11.Locked = True

If you have to save a record then you should use;
DoCmd.RunCommand acCmdSaveRecord
 

Users who are viewing this thread

Back
Top Bottom