473,387 Members | 1,398 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,387 software developers and data experts.

Ensure Date Entered is >= 5 Years in the Future

294 256MB
Hello, everyone.

I've a form where users are entering data, and one of the fields is an election date, where the date the user enters must be >= 5 years in the future. I am not sure how access accomplishes this.

I thought of a validation rule where [ElectionDate] >= DateAdd("yyyy", 5, Date())

However that did not work. Anyone have any ideas?

Thanks.
Nov 25 '13 #1

✓ answered by Seth Schrock

A validation rule should work. Try entering just >= DateAdd("yyyy", 5, Date()). Here is a link that discusses validation rules: Allen Browne Validation Rules

2 1356
Seth Schrock
2,965 Expert 2GB
A validation rule should work. Try entering just >= DateAdd("yyyy", 5, Date()). Here is a link that discusses validation rules: Allen Browne Validation Rules
Nov 25 '13 #2
mcupito
294 256MB
Ah, thanks! I was adding the Field in the Validation Rule.

Cheers, Seth!
Nov 25 '13 #3

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

Similar topics

3
by: Dos Lil | last post by:
Please ignore my previous posting regarding the date. I meant I need to dislay the name of the week as soon as the user enters the date.For example the user enters 12/10/03 the next field should...
2
by: Glenn Banwell | last post by:
Hi, Hope someone can help by keeping this as simple as possible. I'm creating a query that requires a date input from the user. So, up pops the dialogue box and my user enters 19/05/2004. ...
5
by: TN Bella | last post by:
Trying to check if an entry for an date is < 3 years to current date or > 30 days from current date. How can I do this in asp.net....? Do I need to use the customvalidation. Can anyone give me an...
1
by: TN Bella | last post by:
Hello, I was looking through the older posts for a solution to this problem, but I am still confused on how to fix my problem. There are two dates on my form, one (txtInvDate) is entered by the...
1
by: monomaniac21 | last post by:
hi all i have a date on a php page and i need to check if that date ( in this format : 2006-06-04) is more than 2 weeks ago. How can i do this most efficiently? regards marc
6
lobstah24
by: lobstah24 | last post by:
OK...I'm new to MS Access but I am progressing pretty well. I've made a small and simple D Base for our church to track member donations. The form used to enter donations has 4 entry...
2
by: ways2ajay | last post by:
Hello i have problem in saving date value in the database. as i got values in the textboxes either throught the date picker which insert the date in format of "dd/MM/yyyy" . but user can also enter...
1
by: MER2007 | last post by:
Hi! I have a database that is tracking certification. I need to look at the first training date example of one person who as participated in trainings--we have no proof of training in the first 3...
2
by: Arielle | last post by:
I'm trying to build some custome filters for a document reader and one of the fields that I have is the document date (docdate). The customer wants to be able to filter the documents by year and...
2
by: aamir01 | last post by:
I have this situation: Start date = 11/1/2007 End date = 2/28/2008 I have to organize date to determine which year of transaction they fall in. For example using above date, this record should...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.