Calculate total number of days between two dates in a combo box

  • Thread starter Thread starter lastiko
  • Start date Start date
L

lastiko

Guest
Hello everyone,

I have run into a brick wall. I am working with Access 97 and I want to calculate the total number of days between two dates in separate combo boxes. I would like the third combo box doing the calculation to automatically add the calculation into my table, where I can querry it for a report.

The first Combo Box's name and control source (from table) is: ITP1 FM DT, the second Combo Box's name and control source (from table) is: ITP1 TO DT.

I have tried using DateDiff("d",[ITP1 FM DT],[ITP1 TO DT]) as the control source of the third combo box. Is this possible? Should I be trying to do this in a querry? I have run into the same problem there as well.

Thank you for your assistance.
 
I tried the same thing and I just wrote one formula on After Update event of my second combo box as

TxtDiff = Cmb2 - Cmb1

and it returned the number of days. I dont know that I m understanding ur problem or not but access calculates date difference by default. Maybe in ur combo box the date colum is not the bound colum and bound colum is hidden (If u've created the combo box through wizard)

Cheers!
Aqif
 
You don't need to (and shouldn't) store the difference in the table in order to use it for reporting. Just calculate it in the report's recordsource query.
 

Users who are viewing this thread

Back
Top Bottom