IIf function

C

Chi

Hi,

There are four fields in the query design view - START DATE, BETWEEN DATE,
DATE REJECTED and TODAY.

The BETWEEN DATE=(TODAY-STARTDATE) . It works fine.


If the users enter a date for the DATE REJECTED field, they would like to
see "0" in the BETWEEN DATE column.

So .....if DATE REJECTED is null, the BETWEENDATE=(TODAY-STARTDATE)
otherwise, the BETWEENDATE will show "0"

Thanks
Chi
 
A

Allen Browne

In the Field row in query design, try:
IIf([Date Rejected] Is Null, 0, [Today] = [StartDate])
 
C

Chi

Thank you so much! It runs perfectly!!!
Chi

Allen Browne said:
In the Field row in query design, try:
IIf([Date Rejected] Is Null, 0, [Today] = [StartDate])

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Chi said:
There are four fields in the query design view - START DATE, BETWEEN DATE,
DATE REJECTED and TODAY.

The BETWEEN DATE=(TODAY-STARTDATE) . It works fine.


If the users enter a date for the DATE REJECTED field, they would like to
see "0" in the BETWEEN DATE column.

So .....if DATE REJECTED is null, the BETWEENDATE=(TODAY-STARTDATE)
otherwise, the BETWEENDATE will show "0"

Thanks
Chi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top