var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Validating a field that can be date or text
I have a field called StartDate that can be either a date or the text string "TBC".
I want to create a validation rule which checks this.
I've tried the rule:
"IsDate([StartDate]) or "TBC"
and this allows "TBC" but doesn't allow a date.
Make this try
If IsDate(Texte3) Or Texte3 = "TBC" Then
Can you format the field as a date? If the date is unknown, you can enter an obvious fake, such as "9/9/9999".
I've used this before, and in queries, I'd create an expression field to use in reports.
Expr1: Iif ([StartDate] = #9/9/9999#,"TBC",[StartDate])
Thanks for replies.
I wanted to keep the validation rule as part of the database engine (i.e. I wanted it to be in the "Validation Rule" Property of the field)So neither of 1st two replies sorted my problem.
With trial and error, I've discovered while my original rule doesn't work:
IsDate([StartDate]) Or ([StartDate]="TBC")
The following does do what I want:
(IsDate([StartDate])=True) Or ([StartDate]="TBC")
This allows either a valid date or "TBC" to be entered.
Strange but my problem is sorted.