How to calculate amount of day's in form based on table

By bloot ·
I want to calculate the amount of day's between 2 dates in a access 2003 form which is based on a table.

In the form I have entered a date. Next session I will enter a second date. I want the form to tell me when I have entered the second date, how many days have elapsed between date 1 and date 2. I want this to be shown in a textbox,but this number doesn't need to be saved in the table. The dates are saved in the table. Thank for helping.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

add a calculated field

by Tony Hopkinson In reply to How to calculate amount o ...

After you've made sure date1 < date2
the VBA function DateDif(Date1,date2,"d")

or something similar.

Or you can point your form at a query and do it in sql with the datediff function and the textbox readonly.

Related Discussions

Related Forums