View Single Post
  #4  
Old April 1st, 2009, 02:30 PM posted to microsoft.public.access
Maurice
external usenet poster
 
Posts: 1,585
Default Find Bad Debtors: DateDiff from now is more than 90 days

Before i'm getting confused too :-) i need a little more explanation from
which you are telling us here. You wrote that the first part works correctly,
which part are we talking about here.

I assume you have put this expression in the query:

IIf(IsNull([Funds Received 1])," ",(DateDiff("d",[Funds Due 1],Now())))

right? And the last part isn't working, the part from DateDiff on...

need to know we are talking about the same..
--
Maurice Ausum


"Confused87" wrote:

Thanks for the speedy respone!

Turns out I can't spell the word Receieved the same way twice; that's solved
the first problem, thank you.

However... the query is still ignoring the first part of the calculation and
only giving the me the DateDiff information. I have tried changing the format
of the "Receieved Funds 1" field in the Table to Text, Number and Date/Time,
however it still isn't pickin g it up

"Maurice" wrote:

If it's asking you for a parameter that means that either the name is spelled
incorrectly or the field cannot be found. The iif(isnull( example you provide
did work for me so place that in the query and make sure you have a field on
your form to which you can reference the field. Based on that field you can
create an unbound field and place =IIf([whatever the field is]"90","Bad
Debt") in there where the [whatever the field is] should be replaced by the
field you dragged onto the form to calculate the difference in dates.

hth
--
Maurice Ausum


"Confused87" wrote:

I am creating a fundraising database and one of the essential duties it needs
to fulfil is to display when a debt is bad.

In my Events Form I have “Funds Due 1” and “Funds Received 1”

I need the following calculation to appear (in the query, though I don’t
mind where it is done as it will end up in a form) but only if “Funds
Received 1” is empty.

=(DateDiff("d",[Funds Due 1],Now())).

I know I need an IF statement somewhere but I am confused as I am not sure
how this will fit together and also whether it happens in the table, query or
form.

I have tried this:

IIf(IsNull([Funds Received 1])," ",(DateDiff("d",[Funds Due 1],Now())))


but it asks me to Enter A Parameter Value for Funds Received 1 and then
displays the same data as the above calculation :/

The next step is to create a button or message in a form for every Bad
Debt(90 days), which I imagine would be

=IIf([whatever the field is]"90","Bad Debt")