Hi Graham
First off let me just say I am not an access expert, this was posted in the Excel forum so you may have better luck if you ask a mod to move this to a more relevant forum.
First you need to restructure your data to be properly normalised. Your second table would be better with a format like so:
LinkID, DateYear, DateMonth, DateDay, CodeLetter
How you get there, you have 2 options.
1. Write some code to loop through your existing table and create the normalised data
2. Write a 'Union' query to do the same
Once you have your data in the correct format then it would be very simple piece of SQL to get the results you want
OR - And this is not recommended. You could concatenate all of your 180 (Might need to break it into months) date fields into one long string. Then to calculate the number of "A's" it is the length of this string minus the length of the string with all the "A's" replaced with nothing.
Here is an example...
CODE
SELECT
[01012010] & [02012010] & [03012010] & [04012010] & [05012010] & [06012010] & [07012010] &
[08012010] & [09012010] & [10012010] & [11012010] & [12012010] & [13012010] & [14012010] &
[15012010] & [16012010] & [17012010] & [18012010] & [19012010] & [20012010] & [21012010] &
[22012010] & [23012010] & [24012010] & [25012010] & [26012010] & [27012010] & [28012010] &
[29012010] & [30012010] & [31012010] as Jan,
Len(Jan) As JanLen, Len(Jan)-Len(Replace(Jan,"A","")) as JanA
FROM DateTable;
HTH
Stu