Re: Date Difference Help Needed

Tech-Archive recommends: Fix windows errors by optimizing your registry



Dave

We're not there, we don't know what your form looks like, or what you're
entering in your form. From you description, it sounds like you are trying
to take a difference between a date ("the current date") and a number ("that
amount of days"). DateDiff() only calculates the difference between two
dates.

By the way, your code appears to be calculating a value of "0" in some
situations -- that is not a date (or rather, a 0 in a date fields results in
a date in the late 1800's! Is that what you are trying to do?

--
Regards

Jeff Boyce
<Office/Access MVP>

"Dave" <mynotebook@xxxxxxxxxxxxxx> wrote in message
news:rLVCf.6796$jO.4641@xxxxxxxxxxxxxxxxxxxxxxx
> I need the difference between the below code and the current date. The
> number of days since it was Invoiced.
> Example; this would give on one of my records the following, but not
> differernce between that amount of days and the current date.
> -317
>
> =([FTimeBillingSub].[Form]![Text39],0) ,This gives the number of days
> since it was Invoiced
>
> Maybe my original formula for Text39 is off;
>
> It is ;
>
=IIf(Nz(DSum("BillAmt","TTimeBilling","TimeID=Forms!TimeCards!TimeID"),0)=Nz
(DSum("Payment","TPaymentSub","TimeID=Forms!TimeCards!TimeID"),0),0,DateDiff
("d",Date(),DMax("BillDate","TTimeBilling","TimeID=Forms!TimeCards!TimeID"))
)
>
>

.



Relevant Pages

  • Date Difference Help Needed
    ... differernce between that amount of days and the current date. ... Maybe my original formula for Text39 is off; ... Prev by Date: ...
    (microsoft.public.access.forms)
  • Formula
    ... one an error must flash to prevent the formula from entering a negative ... amount. ... Frank ... Prev by Date: ...
    (microsoft.public.excel.misc)
  • Re: Quiz Call - Jo
    ... I was entering so quickly my heart was racing by the ... amount and I'm sure of the answer. ... Better get on with my real job now:o) ... Prev by Date: ...
    (uk.rec.competitions)
  • form/subform caclulation timing
    ... I have an "order entry form" can be viewed at ... money (a set limit and limited by the amount of money they pay in). ... The refund field is calculated via subtracting the shiping ... until they get done entering the data. ...
    (microsoft.public.access.formscoding)
  • Re: Taxes and dividend stocks.
    ... A DRIP invests for you four times per year, ... The amount of time entering the transactions in my ... even if your broker charged no commissions at all. ...
    (misc.invest.stocks)