Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy Query Criteria Question... 1

Status
Not open for further replies.

danomaniac

Programmer
Jan 16, 2002
266
US
Hey gang,
I'm having trouble with a query statement.

Expr2: IIf([forms]![frmName]![checkbox1]=True,[EndTime] Is Null,[EndTime] Is Null Or <[forms]![frmName]![txtEndTime])

If the checkbox is checked, the query works and returns only records with no EndTime, but if the checkbox is not checked, I get no records at all. I want all records that are either null or less than txtEndTime.

I know I'm close, but can't seem to close the deal. Any help would be appreciated.

Thanks.
Dan

&quot;It's more like it is now, than it ever has been.&quot;
 
Dan,

Try this -


Expr2: IIf([forms]![frmName]![checkbox1]=True,[EndTime] Is Null,([EndTime] Is Null Or [EndTime]<[forms]![frmName]![txtEndTime]))



Hope this helps,

Steve
 
Steve.

Awesome! I knew I was close. Thanks very much - nothing worse than banging your head on the monitor because you can't think of something. Worked perfectly. Thanks again.

Dan.

PS..Have a star!

&quot;It's more like it is now, than it ever has been.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top