I need a date field to calculate according to another

C

Corey Keller

I need a date field to automatically calculate based off of a another field
entry in the same record. The dates are directly relational. Here is what I
need, when a date is entered into one field in a record, another field in the
record automatically updates by adding 112 days to the first date. Nothing
else is needed.
 
A

Arvin Meyer [MVP]

Use an expression as the controlsource of the second textbox in your form.

= [DateField1] + 112
 
T

Tom van Stiphout

On Mon, 31 Dec 2007 14:03:41 -0500, "Arvin Meyer [MVP]" <[email protected]>
wrote:

Since it's not immediately obvious what the unit of measure of that
112 is, I would prefer:
=DateAdd("d", DateField1, 112)

-Tom.
 
A

Arvin Meyer [MVP]

So I'll take this opportunity to describe a Microsoft Date/Time datatype:

A Date/Time datatype in all Microsoft programs is a Double with special
formatting. The whole numbers (to the left of the decimal) are the number of
days since (or negatively before) since December 31, 1899. The fraction is
the time multiplied by 24 hours, so the date and time now is:

39448.7986111111

or

1/1/2008 7:10:00 PM

DateAdd is a useful function, but not as efficient as simple math for
calculating days. It is highly useful for months, and years because it
understands date math in that months and years have variable lengths.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Tom van Stiphout said:
Since it's not immediately obvious what the unit of measure of that
112 is, I would prefer:
=DateAdd("d", DateField1, 112)

-Tom.

Use an expression as the controlsource of the second textbox in your form.

= [DateField1] + 112
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top