Am trying to place an error message that if a date is entered incorrectly (either more older than birthday or recent than leaving date) it wont go to the next field if you presss OK. Just like if you entered a non-date on a date field. Thanks!
Am trying to place an error message that if a date is entered incorrectly (either more older than birthday or recent than leaving date) it wont go to the next field if you presss OK. Just like if you entered a non-date on a date field. Thanks!
Options:
1. ValidationRule and ValidationText properties of the control
2. VBA code in control's BeforeUpdate event
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thanks for the reply! I tried using the ValidationRule, am not sure whats wrong with this, but it gives me the validation rule error everytime i enter a date on PigletDate:
IIf(IsNull([Forms]![Main]![FarrowingDate]),[PigletDate]<=[Forms]![Main]![WeanDate],[Forms]![Main]![FarrowingDate]<=[PigletDate]<=[Forms]![Main]![WeanDate])
Don't use IIf(). https://support.office.com/en-us/article/Restrict-data-input-by-using-validation-rules-B91C6B15-BCD3-42C1-90BF-E3A0272E988D
The expression really makes no sense anyway as it is not proper syntax for an IIf().
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.