>Currently I am using SUM(table.field). How would I put this into a variable first?
Have you tried creating a new form property and setting it as the control?
ie
thisform.r_sum = sum(table.field)
thisobject.control = thisform.r_sum
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place