Query, between, Null, IF, And .........UGH

  • Thread starter Thread starter Kevbro7189
  • Start date Start date
K

Kevbro7189

I have a query that is looking at 3 dates, Ticket date, Issue Date, and
Return date. I want to know if the Ticket Date falls between the Issue and
Return dates. My problem is with entries with Null Return Dates. I want the
query to look at Null Return dates as Now or grater. This is the expression
I have come up with so far but it doesn’t work.

Between [Date issued] And (If(IsNull([Date Returned])),Now())
 
Try this:

Between [Date issued] And IIf([Date Returned] Is Null, Now(), [Date
Returned])
 
Thank you works GRATE!!!!!!!!!!

Allen Browne said:
Try this:

Between [Date issued] And IIf([Date Returned] Is Null, Now(), [Date
Returned])

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

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

Kevbro7189 said:
I have a query that is looking at 3 dates, Ticket date, Issue Date, and
Return date. I want to know if the Ticket Date falls between the Issue and
Return dates. My problem is with entries with Null Return Dates. I want
the
query to look at Null Return dates as Now or grater. This is the
expression
I have come up with so far but it doesn’t work.

Between [Date issued] And (If(IsNull([Date Returned])),Now())
 
Grate ???

or

Great :-)

Kevbro7189 said:
Thank you works GRATE!!!!!!!!!!

Allen Browne said:
Try this:

Between [Date issued] And IIf([Date Returned] Is Null, Now(), [Date
Returned])

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

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

Kevbro7189 said:
I have a query that is looking at 3 dates, Ticket date, Issue Date, and
Return date. I want to know if the Ticket Date falls between the Issue and
Return dates. My problem is with entries with Null Return Dates. I want
the
query to look at Null Return dates as Now or grater. This is the
expression
I have come up with so far but it doesn’t work.

Between [Date issued] And (If(IsNull([Date Returned])),Now())
 
Back
Top