S
sendahook
Hello,
I know I read how to do this once and didn't pay attention to it
thinking I would never use it. Of course, now I need it and can't find
it again...
Anyway, I would like to calcuate a date based on a user chosen field
(value list) in a drop down combo box. ie... If the user chooses "3
days" in the TIMEACTIVE field, a calculation would be performed in the
ENDINGDATE field that would show 3 days in the future. If "1 week" was
chosen, then calculation for 7 days would be done and so on....
Now I know how to use the DateAdd function to acheive this:
DateAdd("d",3,Date()) would give me three days ahead, etc. My problem
is incorporating this into the control source properties of the
ENDINGDATE field. I've tried using "IIf" action, but so far no luck.
All I get is #Name? in the ENDINGDATE field. I think I tried something
like: IIf([TIMEACTIVE]=1 DAY, DateAdd("d",1,Date()) I'm sure I'm not
expressing the calcualtion right, but can't find any other examples to
base it off of. Any suggestions on how to get this to work?
Thanks in advance
I know I read how to do this once and didn't pay attention to it
thinking I would never use it. Of course, now I need it and can't find
it again...
Anyway, I would like to calcuate a date based on a user chosen field
(value list) in a drop down combo box. ie... If the user chooses "3
days" in the TIMEACTIVE field, a calculation would be performed in the
ENDINGDATE field that would show 3 days in the future. If "1 week" was
chosen, then calculation for 7 days would be done and so on....
Now I know how to use the DateAdd function to acheive this:
DateAdd("d",3,Date()) would give me three days ahead, etc. My problem
is incorporating this into the control source properties of the
ENDINGDATE field. I've tried using "IIf" action, but so far no luck.
All I get is #Name? in the ENDINGDATE field. I think I tried something
like: IIf([TIMEACTIVE]=1 DAY, DateAdd("d",1,Date()) I'm sure I'm not
expressing the calcualtion right, but can't find any other examples to
base it off of. Any suggestions on how to get this to work?
Thanks in advance