IIf function

  • Thread starter Thread starter Chi
  • Start date Start date
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
 
In the Field row in query design, try:
IIf([Date Rejected] Is Null, 0, [Today] = [StartDate])
 
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
 
Back
Top