Access 2010 Calculated query field

carp117

New Member
Joined
Jan 28, 2013
Messages
2
I am using a query that compares two fields from a large db. This I can do. What I would like to do is - have a calculated field that tells me the number of matches found so I then can perform other calculations such as averages or percentages Etc. In Excel I use the Count or CountA functions and it works fine. Can You help?
 

alansidman

Well-known Member
Joined
Feb 26, 2007
Messages
5,097
Office Version
2019
Platform
Windows
Once you have designated which records have fields that match or don't match identified, create a new query with that field in your grid twice. In the new query run an aggregate query to count the number of instances that match and don't match. Look here for how to do that.

MS Access: Count Function
 

carp117

New Member
Joined
Jan 28, 2013
Messages
2
Home------Away------Score------Played
Bath ------ Sale--------0-0
Bath -------Sale--------0-0
Bath -------Sale--------0-0
Bath -------Sale--------0-0
----------------------------------------4
I run a query to display these matches between Bath - Sale (no problem). I wish a result of 4 to be placed in the Played column.
 

alansidman

Well-known Member
Joined
Feb 26, 2007
Messages
5,097
Office Version
2019
Platform
Windows
Try this:

Code:
SELECT Table1.Home, Table1.Away, Count(Table1.Score) AS Played
FROM Table1
GROUP BY Table1.Home, Table1.Away;
 

Forum statistics

Threads
1,085,033
Messages
5,381,309
Members
401,733
Latest member
Kabasa007

Some videos you may like

This Week's Hot Topics

Top