dk04
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
Here is a sample of the data-
StoreNumber DSales
1 100
2 500
30 200
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I ended up using DLOOKUP but you gave me the idea with your DSUM solution. Thanks for the help.
You're welcome.
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)