By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,638 Members | 2,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,638 IT Pros & Developers. It's quick & easy.

Validation Rule for DATE

P: 1
How do I create a validation rule for a date which is all numbers?
Example: 12-02-06 How do I make a rule to make sure the month field is >0 and is equal to or less than 12?

Likewise with the day? How do i make sure the day is greater than 0 but less than 31?

thanks....David
Oct 31 '06 #1
Share this Question
Share on Google+
2 Replies


pks00
Expert 100+
P: 280
How do I create a validation rule for a date which is all numbers?
Example: 12-02-06 How do I make a rule to make sure the month field is >0 and is equal to or less than 12?

Likewise with the day? How do i make sure the day is greater than 0 but less than 31?

thanks....David

What do u mean by all numbers? do u mean a syntax like DDMMYYYY or MMDDYYYY?

If this is a bounded form and the textbox is based on a date field, u can set the format property to be this date mask and let access do the validation for u

failing that u could use the BeforeUpdate in code and validate it that way

But since I dont know what date mask u are using, its difficult to know what kind of validation to put
Oct 31 '06 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
How do I create a validation rule for a date which is all numbers?
Example: 12-02-06 How do I make a rule to make sure the month field is >0 and is equal to or less than 12?

Likewise with the day? How do i make sure the day is greater than 0 but less than 31?

thanks....David
From your question it sounds as if you haven't set your Date Field to a date format as this would automatically validate the question your asking.

What format are you using and why?
Oct 31 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.