Question Locked

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

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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.

2 replies

by tony hopkinson

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.

This discussion is closed to new replies.