Access want a parameter value / SQL group by not working

JoeRooney

Board Regular
Joined
Nov 27, 2017
Messages
169
Office Version
  1. 365
Hi,

I am new to SQL in Access and have the below query with somesql I am currently writing.

Table: SCF_Historical_DB
Field to sum: Premium_Records
Group By: Operation_Type

The below query sums the total but is not grouping by theoperation type. It is just giving a grand total.

The operation type contains New Business, Renewal orCancellation but when I run the query I get a enter parameter value dialog boxfor Premium_Records.Operation_Type

When I leave it blank and press ok I grand total under premium,what I would to achieve is a total for each operation type.


Can any one assist with how to achieve this?

Any help is greatly appreciated.

SELECTFormat(Sum(SCF_Historical_DB.Premium_Records),"Currency") AS Premium
FROM SCF_Historical_DB
GROUP BY Premium_Records.[Operation_Type];

Thanks

 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Perfect, thank you

Here is my final code for anyone else that might find ituseful

SELECT SCF_Historical_DB.Operation_Type, Format(Sum(SCF_Historical_DB.Premium_Records),"Currency")AS Premium

FROM SCF_Historical_DB

GROUP BY SCF_Historical_DB.Operation_Type

 
Upvote 0

Forum statistics

Threads
1,214,786
Messages
6,121,546
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top