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

([StartDate] <= [EndDate])

P: 1
I am trying to create a field validation that will pop up a warning that the start date must be before the end date however it keeps failing I have tried multiple variants yet they still do not work.
Jul 15 '12 #1
Share this Question
Share on Google+
3 Replies


Rabbit
Expert Mod 10K+
P: 12,366
Not working isn't a very helpful statement. What about it isn't working? Are you getting errors? What is the text of the error? Is the validation occurring but giving incorrect results? What are the incorrect results you're getting?
Jul 15 '12 #2

100+
P: 759
As far as I know this is not possible for a table.
You must design a form then use the before update event (for that form) to check the dates.

Cheers !
Jul 16 '12 #3

zmbd
Expert Mod 5K+
P: 5,397
AFAIK: You can not do this at the data-entry level as the record hasn't been saved yet; thus, the field data doesn't seem to exsist as far as MSA is concerned...

My workaround for those occations I really want this to happen at the table level is to do this in the table level properties.

How I do this in 2010 is to design the fields, then click on the tab of the table, click on the properties button in the ribbon table-tools-design:


Notice I didn't use a very informative message... What I think happens now is that the record is committed to the table... and the fields are available for review. I really don't know; however, it works! :)

One thing to note... if you are using an autonumber, when the validation fails, if the user cancels the save, the autonumber will increment and the record coursor stays on the last field selected prior to attempting to save the record so if you have mulitple validations going at this level it makes a validation text message harder to write!

-z


-z
Attached Images
File Type: jpg tableproperties.jpg (79.1 KB, 1055 views)
Jul 16 '12 #4

Post your reply

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