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!

MS Access - Creating IF, THEN report expressions

Status
Not open for further replies.

russm101

IS-IT--Management
May 6, 2005
26
US
I have a report that feeds from a query listing checkbox and text data. I using the =Sum(IIF.....)1,0) expression to total the yes/no values in this report. I am also using a division value expression to determine sales percentage. Can someone help me with estabalishing date criteria? I need to produce =sum totals of the yes/no value going back 7 days and MTD. When I add the "between" expression in the criteria for the query along with my other needed criteria and "or" characteristics, I end up with blank data in my query view.

Any ideas, I am stumped

Thanks Russm101
 
How are ya russm101 . . . . .

Be more specific about [blue]going back 7 days and MTD[/blue], and what is [purple]MTD[/purple]?

Calvin.gif
See Ya! . . . . . .
 
Hit submitt too soon . . . .

Post the [blue]criteria[/blue] your currently using . . .

Calvin.gif
See Ya! . . . . . .
 
Thanks for the quick response!

What I mean by 7 days and MTD is that I need to produce weekly and Month-to-date reports of the totals and percentage averages in 3 yes/no values.

once again, thanks....
 
russm101 . . . .

[ol][li]For the past seven days, is that [blue]current date inclusive[/blue] (past six days + current date)?[/li]
[li]For MTD, is that current month to date?[/li][/ol]

Calvin.gif
See Ya! . . . . . .
 
Yes to both questions.

Thanks for your quick response.
 
In the criteria line for your DateField . . .

. . . for past 7 days:
Code:
[blue][[purple][b]YourDateFieldName[/b][/purple]] Between Date()-6 And Date()[/blue]
. . . for MTD:
Code:
[blue]Year([[purple][b]YourDateFieldName[/b][/purple]])=Year(Date()) And Month([[purple][b]YourDateFieldName[/b][/purple]])=Month(Date())[/blue]

Calvin.gif
See Ya! . . . . . .
 
Fantastic. That worked great! Thanks for help and support!

Russm101
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top