Assuming that you have a Unique Key in your table try this.
Create a public sub routine that looks like this (just type "public sub blahblahblah" outside of after any "End Sub" in the VBA section):
public sub RetrieveAndTotal(Key as Integer)
Dim db as DataBase
Dim rst as Recordset
Dim SQLStr...