MikeAngelastro
Registered User.
- Local time
- Today, 01:13
- Joined
- Mar 3, 2000
- Messages
- 254
Hi,
I have a form where I have Me.AllowAdditions is set to False at load time. The form also has a button that changes Me.AllowAdditions to True to allow users to add records; the button then becomes a "Disable Record Additions" button earmarked for when the user has added all the records planned. However, I would also like to give users the ability to change their minds. When they click the button to disable record additions, and a key field is null, as soon as VBA changes Me.AllowAdditions to False I get an error. I think it's because Access is trying to store the record in the table when not all the conditions for table records are met. The error code is 3101 and I'm having difficulty figuring out how to prevent the attempt to store the record and thus avoid the error.
I have a form where I have Me.AllowAdditions is set to False at load time. The form also has a button that changes Me.AllowAdditions to True to allow users to add records; the button then becomes a "Disable Record Additions" button earmarked for when the user has added all the records planned. However, I would also like to give users the ability to change their minds. When they click the button to disable record additions, and a key field is null, as soon as VBA changes Me.AllowAdditions to False I get an error. I think it's because Access is trying to store the record in the table when not all the conditions for table records are met. The error code is 3101 and I'm having difficulty figuring out how to prevent the attempt to store the record and thus avoid the error.