you need to understand what the various events that Access provides as hooks to associate code
there's load, open, got focus events and so on
various things can or cant be done depending on what the event is.
I suspect you'd be better off placing your code in another event. probably the forms got focus event
if you only use the recordset to populate a control then you may be better of resource wise using a dlookup
text79.value = dlookup("SUNDAY", "TOTALS", " HG_ID = " & HG_ID.Value")
Also I'd stronlgy recommend that you give your controls meaning full names. the defautl from Access is fine as a default but text79 is not helping you when you or another person has to revisit this code in a few days / weeks / months / years
I'd rather be riding on the Tiger 800 or the Norton