Hank.School
Registered User.
- Local time
- Today, 16:01
- Joined
- Oct 14, 2016
- Messages
- 39
I have a form that does some checking in a Command_Click event to see if the associated record is valid to be updated. Everything works fine EXCEPT that the user can still save an unverified record by changing some of the fields and hitting SHIFT+ENTER.
I have looked around and it seems the best place to catch this is in the Form's BeforeUpdate sub and I was curious of the best way to handle this. Should I create a public variable to pass between the subs or is there another way to pass an allow/disallow condition to the BeforeUpdate sub from the Click sub? I try to minimize public variables if possible but if it is the only (or best) way to do it then so be it.
A Me.Undo command would be waiting in BeforeUpdate for anything that wasn't a validated update.
Thanks
Hank
I have looked around and it seems the best place to catch this is in the Form's BeforeUpdate sub and I was curious of the best way to handle this. Should I create a public variable to pass between the subs or is there another way to pass an allow/disallow condition to the BeforeUpdate sub from the Click sub? I try to minimize public variables if possible but if it is the only (or best) way to do it then so be it.
A Me.Undo command would be waiting in BeforeUpdate for anything that wasn't a validated update.
Thanks
Hank