Skip to content
Advertisement

MS Access: Why is my error message appearing immediately after entry?

I have created a form where I enter in faculty information and I made error messages appear if certain fields are missing.

enter image description here However, as soon as I click save, the form saves the entry like I wanted, but also immediately generates the error messages I created, even though I didn’t have a chance to enter anything new into the fields. My code is this…

I thought I fixed things with the OKToSave portion, but its not working. What is causing this?

Advertisement

Answer

The very first thing your handler does is move to a new record:

That saves the record. Nothing after that matters. So remove that line.

Replace the line:

With this instead:

This will make it so you won’t save and move the current record until it’s OKToSave

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement