A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Validation rule for Access 2003



 
 
Thread Tools Display Modes
  #1  
Old March 12th, 2009, 03:12 AM posted to microsoft.public.access.tablesdbdesign
Hasi
external usenet poster
 
Posts: 3
Default Validation rule for Access 2003

Hi,

I am working on a project in Access 2003 and trying to create a validation
rule for filed in a table.

Requirement:
There are two fields -
1. Con Method - Dropdown with 6 values - A,B,C,D,E & F
2. Prime Number - Numeric field to be entered by user

Condiiton in validation rule should validate following:
If the Con Method field = C then the user must enter the Prime Number field
otherwise Prime Number field can be null.

Question to you if you can answer:
How do we implement this in validation rule for the field - Prime Number

I was going through your turorials on webpage -
http://www.everythingaccess.com/tuto...lidation-Rules
but could not get to that point.

Any help is appreciated!!

thanks,
Hasi

  #2  
Old March 12th, 2009, 04:45 AM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default Validation rule for Access 2003

Perhaps something like this in the validation rule of the *table* (not
field):
([Con] Is Null) OR ([Con] "C") OR ([Prime Number] Is Not Null)

Be sure to use the table rule:
http://allenbrowne.com/ValidationRul...ValidationRule
--
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.

"Hasi" wrote in message
...
Hi,

I am working on a project in Access 2003 and trying to create a validation
rule for filed in a table.

Requirement:
There are two fields -
1. Con Method - Dropdown with 6 values - A,B,C,D,E & F
2. Prime Number - Numeric field to be entered by user

Condiiton in validation rule should validate following:
If the Con Method field = C then the user must enter the Prime Number
field
otherwise Prime Number field can be null.

Question to you if you can answer:
How do we implement this in validation rule for the field - Prime Number

I was going through your turorials on webpage -
http://www.everythingaccess.com/tuto...lidation-Rules
but could not get to that point.

Any help is appreciated!!

thanks,
Hasi


  #3  
Old March 12th, 2009, 06:41 PM posted to microsoft.public.access.tablesdbdesign
Hasi
external usenet poster
 
Posts: 3
Default Validation rule for Access 2003

Thanks Allen. Will try this and let you know the results.

"Allen Browne" wrote:

Perhaps something like this in the validation rule of the *table* (not
field):
([Con] Is Null) OR ([Con] "C") OR ([Prime Number] Is Not Null)

Be sure to use the table rule:
http://allenbrowne.com/ValidationRul...ValidationRule
--
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.

"Hasi" wrote in message
...
Hi,

I am working on a project in Access 2003 and trying to create a validation
rule for filed in a table.

Requirement:
There are two fields -
1. Con Method - Dropdown with 6 values - A,B,C,D,E & F
2. Prime Number - Numeric field to be entered by user

Condiiton in validation rule should validate following:
If the Con Method field = C then the user must enter the Prime Number
field
otherwise Prime Number field can be null.

Question to you if you can answer:
How do we implement this in validation rule for the field - Prime Number

I was going through your turorials on webpage -
http://www.everythingaccess.com/tuto...lidation-Rules
but could not get to that point.

Any help is appreciated!!

thanks,
Hasi



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:16 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.