Make a required field conditional.

  1. I check the box “Authorized to Preside…”
  2. I go to the select combo box in the form header to select another person.
  3. I am asked if I want to save the changes. I indicate yes.
  4. Then it tells me I need to choose a church. I click OK
  5. I choose a church in the combo box. I then get the error message: Update or CancelUpdate without AddNew or Edit.
HOWEVER. If I use the navigation button on the bottom of the screen to choose another record, instead of doing step 2 above, I do NOT get the error message in step 5 above. Using this method, it all works, and I can go on!

I am willing to PM you the full db, if you want me to.

I appreciate all the time you have put into this. I don.t want to take advantage of all your time, so I understand if you would rather not continue.
Hi. Thanks for the additional information. Yeah, okay, this time, I had to modify your code. However, it wasn't the code for the BeforeUpdate event that we have been discussing here that I had to modify. Instead, it was the code for your Combobox, which wasn't obvious until you provided the steps to reproduce the error.

Unfortunately, since I don't use macros, I converted your code to VBA. If that's not acceptable, please let me know, and I'll try to redo the same thing using your original macros.

Again, please take a look at the changes I made to the code for your Combobox to see what I did, which was simply to add an error handler.

Hope that helps... Cheers!
 

Attachments

Hi. Thanks for the additional information. Yeah, okay, this time, I had to modify your code. However, it wasn't the code for the BeforeUpdate event that we have been discussing here that I had to modify. Instead, it was the code for your Combobox, which wasn't obvious until you provided the steps to reproduce the error.

Unfortunately, since I don't use macros, I converted your code to VBA. If that's not acceptable, please let me know, and I'll try to redo the same thing using your original macros.

Again, please take a look at the changes I made to the code for your Combobox to see what I did, which was simply to add an error handler.

Hope that helps... Cheers!
It worked! I'm glad you did it in VBA. I'll learn something from it! The type in green, are those "notes," or are they part of the VBA. I ask as there are a few other forms I can use this in.
 
It worked! I'm glad you did it in VBA. I'll learn something from it! The type in green, are those "notes," or are they part of the VBA. I ask as there are a few other forms I can use this in.
Hi. Glad to hear it worked for you. The text in green are considered "comments." They are ignored by the code but a good way to document what's happening. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom