473,396 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Table vs Form Level Validation

Just a quick question on this issue.
Assume a small set of fixed values for a field.
For instance Field Gender, values: Male, Female, Unknown

If I create a Combo Box with the above values, I believe I am adding a
form-level validation.

Is it wise to also include the table-level validation for the above
constraint?
For instance, go to the field's validation rule property in Design Mode and
add
IN ("Male","Female","Unknown") ?

This looks like being too pedantic, but there might be cases where it is
necessary (For instance when upsizing, will the combo box constraint be
preserved or not?). I am just asking if there are reasons why one would want
to add validation both ways.

Cheers!
Konstantinos
Nov 13 '05 #1
2 3855
In general, using engine-level validation is better, because it is applied
regardless of how the data is processed (e.g. append query).

For your particular example, it probably doesn't matter too much if bad data
does get into the field. Personally, I would use a table-level validation
rule on the field of:
Is Null Or "M" or "F"

In cases where it does matter, use a lookup table instead of literal values.
Makes it much easier to maintain the values, and you have consistency
between the combo (RowSource as the lookup table) and the engine-level
referential integrity.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Kostas" <no*****@noemail.net> wrote in message
news:10*************@corp.supernews.com...
Just a quick question on this issue.
Assume a small set of fixed values for a field.
For instance Field Gender, values: Male, Female, Unknown

If I create a Combo Box with the above values, I believe I am adding a
form-level validation.

Is it wise to also include the table-level validation for the above
constraint?
For instance, go to the field's validation rule property in Design Mode
and add
IN ("Male","Female","Unknown") ?

This looks like being too pedantic, but there might be cases where it is
necessary (For instance when upsizing, will the combo box constraint be
preserved or not?). I am just asking if there are reasons why one would
want to add validation both ways.

Cheers!
Konstantinos

Nov 13 '05 #2
Perfect answer.
Thank you Allen.

Konstantinos

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:41***********************@per-qv1-newsreader-01.iinet.net.au...
In general, using engine-level validation is better, because it is applied
regardless of how the data is processed (e.g. append query).

For your particular example, it probably doesn't matter too much if bad
data does get into the field. Personally, I would use a table-level
validation rule on the field of:
Is Null Or "M" or "F"

In cases where it does matter, use a lookup table instead of literal
values. Makes it much easier to maintain the values, and you have
consistency between the combo (RowSource as the lookup table) and the
engine-level referential integrity.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Kostas" <no*****@noemail.net> wrote in message
news:10*************@corp.supernews.com...
Just a quick question on this issue.
Assume a small set of fixed values for a field.
For instance Field Gender, values: Male, Female, Unknown

If I create a Combo Box with the above values, I believe I am adding a
form-level validation.

Is it wise to also include the table-level validation for the above
constraint?
For instance, go to the field's validation rule property in Design Mode
and add
IN ("Male","Female","Unknown") ?

This looks like being too pedantic, but there might be cases where it is
necessary (For instance when upsizing, will the combo box constraint be
preserved or not?). I am just asking if there are reasons why one would
want to add validation both ways.

Cheers!
Konstantinos


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rootshell | last post by:
I need to create the table and I want to edit its content from www level. Here is some example: http://www.rootshell.be/~flash44 There is a table. Is there possibilty to edit the content...
3
by: Skippytpe | last post by:
Does anyone have an idea why the form validation in the following page wouldn't be working? I had been using XHTML 1.0 transitional which allowed me to use the form attribute 'name.' I could then...
18
by: Steve | last post by:
Hi I have a really weird problem and any assistance would be welcome. I have developed an app in Access 2002. The app runs perfectly on the development machine. I have packaged the app using...
2
by: eskil | last post by:
Hi, I want to link products and contacts, products and axctivities and activities and contacts. I am using one to many links with full referential integrity. Each table is linked to a table that...
9
by: campbellwarren | last post by:
Does anyone know how I could limit the number of rows allowed in a MS Access table... want to limit it to 1.
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
10
by: gweasel | last post by:
What is the best way to apply a Validation Rule - or rather, where is the best place to put it? Is there an advantage to putting it on the field in the table vs setting the validation rule on the...
2
by: AMBLY | last post by:
Hello! Would be grateful for help with this one - a Record level Validation problem I run Access 2000 on XP A form has two fields: 1) fldLevel – it’s an Option Group with 4 choices = 1, 2,...
6
by: Ledmark | last post by:
Hello - I am in a class for Access 2007 Database apllication design and we are covering types of Validation rules. We have a problem that I'm trying to solve but have no idea how to go about writing...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.