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

Date range problem

Status
Not open for further replies.

seke

Programmer
Nov 30, 2002
14
PT
I'm using the following to obtain a date range of records

Sum(IIf([ACDateRec] Between [Forms]![frmDiaryMain]![UBDATESTART] And [Forms]![frmDiaryMain]![UBDATEEND],[GROSSTOTAL],0))

However the search fails to find all records between dates.

I wish to change the above so rather than use Between I use

Sum(IIf([ACDateRec] >=[Forms]![frmDiaryMain]![UBDATESTART] And <[Forms]![frmDiaryMain]![UBDATEEND],[GROSSTOTAL],0))

Problem Access is happy with >= but produces a syntax error message when I enter the < after the "AND"

Help would be nice.

S.Eke (aka Half way up a wall trying to get it to work)

 



Hi,
Code:
Sum(IIf([ACDateRec] >=[Forms]![frmDiaryMain]![UBDATESTART] And [b][ACDateRec][/b]<[Forms]![frmDiaryMain]![UBDATEEND],[GROSSTOTAL],0))


Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Skip

Thanks

"Looks like I Could not see the wood for the trees"

Works a treat.

S.Eke
 





ahhhh, the selection of cellulite to sore sight.

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top