Help with DateDiff (1 Viewer)

lorenzoaj

Registered User.
Local time
Today, 15:11
Joined
Nov 26, 2001
Messages
32
I have one txt box named txtDEROS and another named txtDaysLeftInCountry. In the after update event of txtDEROS I Have
me.txtDaysLeftInCountry = DateDiff("d", NOW(), [txtDaysLeftInCountry]). It works fine except that it does not update daily when the date changes. I then tried it with a query with the following:
DaysLeftInCountry: DateDiff("d", NOW(), DEROS) and based my frm on the qry but it doesn't store it in the table. Is there any way I can make either one of these ways work. Thanks in advance.

AJ
 
R

Rich

Guest
You don't need to store this value, it can be calculated at any time, in an unbound textbox on a form set the control source to
=DateDiff("d", Date(), [DEROS]) , I'd use Date instead of Now, the time element can produce unexpected results
 

Users who are viewing this thread

Top Bottom