Link to home
Start Free TrialLog in
Avatar of dk04
dk04Flag for United States of America

asked on

Access Report Expression

I need to sum the numbers in the DSales field but exclude from the total sum if the StoreNumber equals 30. This is easy in SQL but with Access it's a little trickier. The expressions will be in the report Group Footer. In a perfect world my expression result would = 600 (summing DSales but excluding StoreNumber 30). I don't see a Where clause in access.

Here is a sample of the data-

StoreNumber       DSales
1                             100
2                             500
30                           200
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
One way:
Have a text box control with data property set to running sum set to Over All.
Control source set to = IIF(StoreNumber=30, 0,  DSales)
Avatar of dk04

ASKER

I ended up using DLOOKUP but you gave me the idea with your DSUM solution. Thanks for the help.
You're welcome.