473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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

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)
Jan 23 '20 #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.

1 1154
NeoPa
32,556 Expert Mod 16PB
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.
Jan 24 '20 #2

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

Similar topics

6
by: geronimo_me | last post by:
I have 20 queries that compare fields in one table with fields in another table - the query results are the records that do not match in Table1 and Table2. ie Table1 DOB 28/02/78 Table2 DOB...
2
by: HarisHohkl | last post by:
Hi, I've this function in a class to update the total value.but when i try to remove the these row highlight in Bold it crash, what should i do???? void display_total_value() { double...
1
by: sssalmanshah | last post by:
How to display Total Value column (In Footer) in the grid view control. For example displaying Basket Total in Footer
6
by: londres9b | last post by:
Let's say I have a page called page.php. And let's also say I have an images folder. How can I make the php page display the images on the folder? But that's not the whole thing... What I really...
1
by: SKODA | last post by:
Hi, I am a beginner to MS ACCESS. I have 100+ tickers and each has a table. I would like to retrieve data from a specified table based on user input. My trials: I am unable to create a form that...
0
by: hosny | last post by:
I have a datagridview with the following column using visual basic 2005 1-First column is country code as DataGridViewTextBoxColumn 2-Second column is country name as DataGridViewComboBoxColumn...
1
by: skfos | last post by:
Windows 7, Access 2013 I created a database to keep track of employees immigration status. Part of this process is tracking how many packets I send off to immigration services. I need to display...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.