Post your code.
Your message comes from ValidationText property?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hmm, first one comes from the Table, the second one looks to be coming from the Form. Perhaps this will help...
https://www.access-programmers.co.uk...d.php?t=190243
Is it necessary to use code for this? If data validation is a built-in feature, it seems odd that code would be needed to make it work properly - unless it's a bug that Microsoft hasn't fixed.Hmm, first one comes from the Table, the second one looks to be coming from the Form. Perhaps this will help...
https://www.access-programmers.co.uk...d.php?t=190243
What are you doing when these messages pop up?
I would say first one is from form control and not sure where second is from.
It would appear that somehow user is getting out of that control in spite of the validation violation and then record attempts to commit triggering second message.
If you want to provide db for analysis, follow instructions at bottom of my post.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
It's not necessary, as I said I like a bit more control then what is built in. Also, the built in is a little harder to navigate when upsizing to an SQL Server. I was simply offering a choice.
I removed the validation from the form controls and added them to the table, and the second message stopped appearing. Weird. I guess moving forward I will use tables for validation rather than forms.
Your code is on a BeforeUpdate event and it presents that message? Then I suspect you do not cancel the update; rather you just exit the sub. Sometimes the answer is to trap a built in error message because it can't be stopped otherwise.Code is not usually required if you place validation at the table level AND include a validation message that makes sense. Often the default message is less than perfect. Code validation is much more powerful, so don't dismiss it out of hand.Is it necessary to use code for this? If data validation is a built-in feature, it seems odd that code would be needed to make it work properly
Last edited by Micron; 08-07-2019 at 06:21 PM. Reason: spelin and gramur
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.