How do I calculate number of days in a form using an unbound labe.

R

Rose

How do I calculate number of days in a form? For example I have a Date
Opened field and a Date Closed field, I need to know the number of days
between the two dats.
 
J

John Vinson

How do I calculate number of days in a form? For example I have a Date
Opened field and a Date Closed field, I need to know the number of days
between the two dats.

The DateDiff function does this. There are of course no days, and no
data, "in a Form" - a form is just a window to display data. But if
your Table has fields [Date Opened] and [Date Closed] you can set the
Control Source of an unbound textbox on a form to

DateDiff("d", [Date Opened], [Date Closed])

This value should NOT be stored into any table. It's redundant.

John W. Vinson[MVP]
 
Top