Sum query results from a subform

  • Thread starter Thread starter diveman
  • Start date Start date
D

diveman

Guest
Hi,

We have 'Agents', 'SubAgents' and 'Customers'. Customers pay varying amounts each month. The Sub Agents receive a commission on the total $ paid by all their customers. I've created a query that lists each Sub Agent and the total (sum) of their customers $. I've created a form with a subform that displays a particular Agents Sub Agents and their customer $ based on the query results. I know this is probably really easy (if so please try not to laugh) but I'm trying to create a text box control field at the form (not sub form) footer that will Sum all the Sub Agents total $. I've tried using an unbound text box with the default level set to
Sum([frmsCurrentAgentCommission.Total Billing]) where frmsCurrentAgentCommission is the subform and Total Billing is the Total Customer $ for that sub agent but I get an #error message. Basically, there is a main agents form with a cmd button on it that when clicked will open the frmCurrentAgentCommission form and display a list of all sub agents for that agent (using forms![....]![....]) with a total of all sub agent $ listed on the bottom of the form. Sorry to be so windy, I'm not very good at explaining these kinds of things. Thanks in advance for any help. Please let me know if you need additional information. Thanks again. I've attached a screen shot - hope it helps. :confused:
 

Attachments

Thanks.

Hi, Thank you for the link. It gave me the information I needed and actually helped me with some other issues I was having with the DB. Thanks again, I appreciate your help.
 
You're welcome! I'm glad that particular topic was covered in the FAQ section because I have to look it up as well!
 

Users who are viewing this thread

Back
Top Bottom