T
TKM
How do I subtract 3 weeks from one date field and have it show in another?
How do I subtract 3 weeks from one date field and have it show in another?
Jeff Boyce said:You could take the suggestion literally and try it ... and it will fail. I
suspect, since we can't see your actual data/fieldnames/etc., that the
suggestion is generic, and you'll have to use your data in place of the
general outline.
As for where you can ... put it, where did you want it to show up? If you
are working in a form, and if the new value is for display purposes only
(i.e., you are not trying to store it), you could enter everything from the
"=" and to the right in the Control Source property of that control on the
form.
If you are trying to come up with a way to store the calculated value, STOP!
It is rarely necessary to store a calculated value, and if you decide you
must, you will also have to build the routines to keep that calculated value
in synch when the underlying component(s) changes.
Instead of storing a calculated value, consider using a query to do the
calculation when you need it. Create a new field in a query, something
like:
NewDateField: DateAdd("ww",-3,OriginalDate)
NOTE: DO NOT use the name of the original date field literally - use your
own.
Regards
Jeff Boyce
Microsoft Office/Access MVP
How do I subtract 3 weeks from one date field and have it show in another?