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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why does IIf..or fail when IsNull

Status
Not open for further replies.

hondurab

Technical User
Jul 19, 2001
14
US
Can anyone figure out why this wouldn't work when[First Stop Time] is null.

First: IIf([Dispatch]=0 Or IsNull([First Stop Time]) Or [First Stop Time]=0 Or [First Stop Time]>=[Dispatch],"No","Yes")

Thanks!
 

Try this. It wil handle the Null condition properly.

First: IIf([Dispatch]=0 Or Nz([First Stop Time])=0 Or Nz([First Stop Time])>=[Dispatch],"No","Yes")
Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top