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

Multiple critera in Where Condition 2

Status
Not open for further replies.

TimTDP

Technical User
Feb 15, 2004
373
ZA
In Access 2000 I want to filter the data for a report by Company and a specific date. This I can do. However I also want to include all records if the date field is empty.

The data field is called EDA

I have tried the following:

Wclause = "OrganisationId = " & OrgId & _
" and EDA >= #" & Format$(ReportFromDate, "yyyy-mm-dd") & "#" & _
" or IsNull(EDA)"

Where is the error?
 
The error is in IsNull, it should be:

EDA Is Null
 
Thanks

I still get two OrganisationId's in the result.
In the result I want only 1 OrganisationId, and all the records where EDA matches the date criteria and all records where EDA Is Null
 
do you mean that you want to get results only for that orginisationid ?
 

How about...
Code:
Wclause = "OrganisationId = " & OrgId & _
" and [COLOR=red]([/color]EDA >= #" & Format$(ReportFromDate, "yyyy-mm-dd") & "#" & _
" or [COLOR=red]EDA Is Null)[/color]"


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top