Proper Precedence of Validation Rule and its Implementation?

spenz

Registered User.
Local time
Today, 12:39
Joined
Mar 26, 2009
Messages
61
Good Day! I just want to ask since there are two ways to which we can implement our validation rules in general; One in Table and another in a form, how do you usually implement it? Are you using both form and table validation rule capability or just one of them and make it as solid as possible? Because as of now, I have validation rules for both tables and my forms and i find it redundant but at the same time anticipating guilt feelings if i remove all of my validation rule on the table level because i've read several articles regarding validations that veterans strongly suggests it to be implemented on the table level. But in my experience, i find it more reliable to implement all of my validation rules on the form level because most of the time the table level rule bypasses some of the transactions that are not meant to be saved. So i had to repeat the validation code in the form level just to remind access 2007 of what the conditions are before saving the said transaction.

In conclusion, I have lots of redundant validation rules between my tables and forms. I'm not sure if this can affect my database efficiency somehow or maybe in the long run but personally i just want to do it the right way. So i'm sorry i had to ask this question just to clear things up a bit. I really need your opinion on this. Thank you in advance.
 
I personally use *no* validation at the table level. All of my validation is done in the forms. I find I have far more control over the messages and user interface that way. Just my $0.02.
 
I personally use *no* validation at the table level. All of my validation is done in the forms. I find I have far more control over the messages and user interface that way. Just my $0.02.

I will say that I do the same thing - validation at form level and I don't give my users access to tables or queries directly as that quickly loses control of the ability to validate.
 
RuralGuy and BobLarson,

Thank you for that super quick reply I appreciate it very much. I will now remove all of my tables validation rules as it appears it just takes one solid way to perfectly implement proper validation and the form level can do just that and as what bob had mentioned earlier; my intention is also the same, I don't want them touching my tables. They're mine!:D
 
i don't think i would go to the trouble of REMOVING tried and tested validation rules.

i think if its something simple like <=date() then they are probably very useful, as you could forget to code this. After all, a validation "rule" at the index level (ie unique key) is non-negotiable.

I just think a lot of the time the validation is more complex than this, and although it can be coded, it can't always be specified at the tabel level - and once you get used to coding all your validations, its just easy to carry on that way.

I think the point about replacing access messages is also germane - a general access message can never be as informative as an application-specific one of your own.
 

Users who are viewing this thread

Back
Top Bottom