By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,275 Members | 1,927 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,275 IT Pros & Developers. It's quick & easy.

How to display total of sold paintings,based on yes or no datatype?

P: 1
I have a table in which there are values for sales of paintings and i also have a yes or no data type field called "Sold".I created a report based on that table and only want to display the sum of all the sold paintings,thus excluding unsold ones. How do I go about this? Please help(I need this for an exam but I wasn't taught this)
4 Weeks Ago #1

✓ answered by NeoPa

You could create a Query to run the Report from which includes whatever Fields you need from the original table plus another (in your SQL) :
Expand|Select|Wrap|Line Numbers
  1. SELECT ...
  2.      , IIf([Sold],[SalePrice],0)
In your Report you Sum() the [SalePrice] Field.

Share this Question
Share on Google+
1 Reply


NeoPa
Expert Mod 15k+
P: 31,660
You could create a Query to run the Report from which includes whatever Fields you need from the original table plus another (in your SQL) :
Expand|Select|Wrap|Line Numbers
  1. SELECT ...
  2.      , IIf([Sold],[SalePrice],0)
In your Report you Sum() the [SalePrice] Field.
4 Weeks Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.