G
Guest
I am building a form that has the following fields among others:
1) Today + 28 Days
2) Today + 3 Days
3) Patient Over 1 Year Old?
4) Expiration Date of Irradiated Unit
Short date is the specified format for each of the date fields. The third
field is a text field with a Yes/No format.
I was able to use expressions to automatically populate the first two
fields. I want the fourth field to automatically populate with either the
value in the first or second field depending on the value in the third field.
If the value in the third field is "yes", the value from the first field
should fill in the fourth field. If the value in the third field is "no",
the value from the second field should fill in the fourth field. I tried the
following expression in the control source for the last field:
=Iff ([Patient Over 1 Year Old?]="Yes", [Today + 28 Days], [Today + 3 Days])
The expression automatically defaults the value for [Today + 3 Days] in the
fourth field before the third field is answered because "Yes" is not in the
third field when the form is opened or a new record is started. When "No" is
entered into the third field, the value in the fourth field does change to
the value for [Today + 28 Days]. Ideally, I would like the fourth field to
remain blank until the third field is answered. Is there another expression
that would accomplish this. Thank you.
1) Today + 28 Days
2) Today + 3 Days
3) Patient Over 1 Year Old?
4) Expiration Date of Irradiated Unit
Short date is the specified format for each of the date fields. The third
field is a text field with a Yes/No format.
I was able to use expressions to automatically populate the first two
fields. I want the fourth field to automatically populate with either the
value in the first or second field depending on the value in the third field.
If the value in the third field is "yes", the value from the first field
should fill in the fourth field. If the value in the third field is "no",
the value from the second field should fill in the fourth field. I tried the
following expression in the control source for the last field:
=Iff ([Patient Over 1 Year Old?]="Yes", [Today + 28 Days], [Today + 3 Days])
The expression automatically defaults the value for [Today + 3 Days] in the
fourth field before the third field is answered because "Yes" is not in the
third field when the form is opened or a new record is started. When "No" is
entered into the third field, the value in the fourth field does change to
the value for [Today + 28 Days]. Ideally, I would like the fourth field to
remain blank until the third field is answered. Is there another expression
that would accomplish this. Thank you.