Form with Sub Form Question

S

SteveH

I have an order form with a sub form showing order details. In the footer of
the order form, I have an unbound text box that I would like to show an order
total. The total would come from the line items in sub form. How can I
accomplish this? Also, would it be possible from the total text box to update
each time an order detail is added? Any help would be greatly appreciated.
 
B

Beetle

Put a hidden text box (set its Visible property to No) in the footer
of your subform (name it, say, txtSubTotal). Set its Contol Source
to;

=Sum([SomeField])

Then put a text box in the footer of your main form and set its
Control Source to;

=[SubformControlName].[Form]![txtSubTotal]

Note: SubformControlName referes to the name of the sub form
control (the window) that holds the sub form, which may or
may not be the same as the name of the sub form itself.
 
S

SteveH

That worked perfectly. Thanks!

Beetle said:
Put a hidden text box (set its Visible property to No) in the footer
of your subform (name it, say, txtSubTotal). Set its Contol Source
to;

=Sum([SomeField])

Then put a text box in the footer of your main form and set its
Control Source to;

=[SubformControlName].[Form]![txtSubTotal]

Note: SubformControlName referes to the name of the sub form
control (the window) that holds the sub form, which may or
may not be the same as the name of the sub form itself.

--
_________

Sean Bailey


SteveH said:
I have an order form with a sub form showing order details. In the footer of
the order form, I have an unbound text box that I would like to show an order
total. The total would come from the line items in sub form. How can I
accomplish this? Also, would it be possible from the total text box to update
each time an order detail is added? Any help would be greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top