A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form with Sub Form Question



 
 
Thread Tools Display Modes
  #1  
Old July 20th, 2009, 06:30 PM posted to microsoft.public.access.gettingstarted
SteveH
external usenet poster
 
Posts: 69
Default Form with Sub Form Question

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.
  #2  
Old July 20th, 2009, 07:17 PM posted to microsoft.public.access.gettingstarted
Beetle
external usenet poster
 
Posts: 1,254
Default Form with Sub Form Question

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" wrote:

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.

  #3  
Old July 20th, 2009, 08:06 PM posted to microsoft.public.access.gettingstarted
SteveH
external usenet poster
 
Posts: 69
Default Form with Sub Form Question

That worked perfectly. Thanks!

"Beetle" wrote:

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" wrote:

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.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.