I’m developing an Access 2003 Database that uses a MS SQLServer backend.
I’m trying to do Form Validation and am experiencing some problems.
- ValidationRule for each field seems to be ignored
- I can’t figure out what event I should override to enforce validation without having the database do it. (I’m not against this, it’s just unknown to me how I’d catch Error Messages, instead of displaying them to the user)
I’ve tried getting around number 2 by disallowing closing and enforcing the use of a ‘Close Button’, but the user can side step it by pressing tab, or by pressing the ‘Next Record’ button at the bottom.
Any suggestions would be greatly appreciated.
If you are using the validation rules property, you can catch validation and duplicate key errors, amongst other things, in the Form Error event:
You can enforce the use of your close button with a variable defined at form level and set to false unless your button is clicked.
From: http://www.tek-tips.com/faqs.cfm?fid=2071