Using MS Access 365. I have a query that counts the number of times a song has been performed given a date range entered by the user (just me). What I would like to be able to do, however, is update a Yes/No field from within that query. I went about a bit of trial and error and it seems that the aggregate function (if I'm using that term correctly) 'Group By', which seems to be required for this query to run, prevents any updates to that particular field. (The field in question is 'SheetMusic'.)
Is there a way to create a query that would allow me to update that field?
Screenshot of the 'Design View' in MS Access:
Thanks!!
Matt
Is there a way to create a query that would allow me to update that field?
Code:
SELECT Count(tblSongsPlayed.SongID) AS [Song Count], tblSongs.Title, tblSongs.SheetMusic
FROM tblSongs INNER JOIN (tblEvents INNER JOIN tblSongsPlayed ON tblEvents.EventID = tblSongsPlayed.EventID) ON tblSongs.SongID = tblSongsPlayed.SongID
WHERE (((tblEvents.Date)>=DateAdd("yyyy",-1*[How Many Years Back Do You Want To Go?],Now())))
GROUP BY tblSongs.Title, tblSongs.SheetMusic
ORDER BY Count(tblSongsPlayed.SongID) DESC;
Screenshot of the 'Design View' in MS Access:
Thanks!!
Matt