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

IIf IsNull Problems 1

Status
Not open for further replies.

smdemo

Programmer
Sep 15, 2002
63
0
0
US
I have a query that is linked to a search form that I am having issues with. I am fine with everything until I get to including a date range. I used the criteria of 'IIf(IsNull([Forms].[Search].[BeginDate])=True,[SubmitDate],Between [Forms].[Search].[BeginDate] And [Forms].[Search].[EndDate])' for the date field and it doesn't seem to want to work. I'd appreciate any help someone may be able to provide.

Thanks
Steve
 
You can't place the operator (BETWEEN) inside the IIf(). Try
Code:
[SubmitDate] Between [Forms].[Search].[BeginDate] And [Forms].[Search].[EndDate] OR [Forms].[Search].[BeginDate] Is Null

Duane
Hook'D on Access
MS Access MVP
 
Worked perfect. Thanks a bunch.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top