473,770 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3879
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*****@noemai l.net> wrote in message
news:10******** *****@corp.supe rnews.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*********@Se eSig.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*****@noemai l.net> wrote in message
news:10******** *****@corp.supe rnews.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
1810
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 using <input> command?
3
2875
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 just point the regular expression test to document.login.frmEmployeeNumber.value and have it validate. Now that I'm at XHTML 1.1 strict, I can only use form id's so I *thought* I could pull the elements out as I have below, but it's not...
18
9045
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 the Microsoft XP Developer Packaging Wizard (Service Pack 1). The 1st 3 releases of the app ran perfectly on site.
2
1443
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 defines the possible relationship between either 2 tables. My question is: does this increase the risk for data corruption or pose other problems that need be taken into account before plunging in?
9
13802
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
4754
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 appears that the data goes straight to the processing page, rather than the javascript seeing if data is missing and popping up an alert. I thought it may be because much of the form is populated with data from the db (lists, etc.), but when I leave...
10
5723
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 form the control is on? Basically I have a number of controls in a form that are required, and to check it I am setting the Validation Rule to "<>"IsNull" so that when the user tries to tab through/click out of a required area without entering...
2
2727
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, 3 and 0. 2) fldStatus – is a limited value-list (Combo) with 3 choices = Unassigned, In-Progress, Complete. Any record in the form cannot be both Level_0 and Status_Complete
6
8161
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 it. We are building a database for a condo rental company and the rental transaction table includes an arrival date and a departure date. We need to write a table-level validation rule that indicates the departure date is seven days after the...
0
9453
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8929
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7451
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.