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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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]
 

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

Back
Top