Thanks, Gasman. I have tried using Me.HistoryID with various combinations of square and round brackets, with and without quotes. All rejected, I'm afraid.
Herewith two screenshots, one of "working", when the PKID's are adjacent and "notworking", when they are not.
In the latter, the total in the...