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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Subform Calculations



 
 
Thread Tools Display Modes
  #1  
Old April 9th, 2008, 05:26 PM posted to microsoft.public.access.forms
cel504
external usenet poster
 
Posts: 39
Default Subform Calculations

Could anyone tell me, is it possible do a summary calculation of a subform
and show the results on the main form. If I have a form and there is a
subform displayed on it. One of the fields on the subform, is say a job cost,
as the additional records are entered on the subform, the cost is calculated
and displayed in a text box on the main form.

Any ideas, on if this is possible. Many thanks.


  #2  
Old April 9th, 2008, 06:23 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Subform Calculations

You can put an invisible TextBox in the Footer of the SubForm named txtTotal
and set the ControlSource of this TextBox to =Sum([job cost])

Then you can have a TextBox on the MainForm with the ControlSource set to:
YourSubFormControlName.FORM.txtTotal
...using your sub form control name of course.

cel504 wrote:
Could anyone tell me, is it possible do a summary calculation of a subform
and show the results on the main form. If I have a form and there is a
subform displayed on it. One of the fields on the subform, is say a job cost,
as the additional records are entered on the subform, the cost is calculated
and displayed in a text box on the main form.

Any ideas, on if this is possible. Many thanks.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1

  #3  
Old April 9th, 2008, 10:56 PM posted to microsoft.public.access.forms
cel504
external usenet poster
 
Posts: 39
Default Subform Calculations

Many thanks for your quick reponse and I understand what you are saying, will
this work if the subform is in a datasheet view? I have tried doing what you
suggested and it displays and error message.

Any further ideas, but I will keep trying.




"cel504" wrote:

Could anyone tell me, is it possible do a summary calculation of a subform
and show the results on the main form. If I have a form and there is a
subform displayed on it. One of the fields on the subform, is say a job cost,
as the additional records are entered on the subform, the cost is calculated
and displayed in a text box on the main form.

Any ideas, on if this is possible. Many thanks.


  #4  
Old April 10th, 2008, 12:14 AM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Subform Calculations

It should work just fine in Datasheet mode. Perhaps your reference to the
control syntax is not correct.
http://www.mvps.org/access/forms/frm0031.htm

cel504 wrote:
Many thanks for your quick reponse and I understand what you are saying, will
this work if the subform is in a datasheet view? I have tried doing what you
suggested and it displays and error message.

Any further ideas, but I will keep trying.

Could anyone tell me, is it possible do a summary calculation of a subform
and show the results on the main form. If I have a form and there is a

[quoted text clipped - 3 lines]

Any ideas, on if this is possible. Many thanks.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1

  #5  
Old April 10th, 2008, 09:08 AM posted to microsoft.public.access.forms
cel504
external usenet poster
 
Posts: 39
Default Subform Calculations

Once again many thanks for that and I will go over the it again and check it
out.



"ruralguy via AccessMonster.com" wrote:

It should work just fine in Datasheet mode. Perhaps your reference to the
control syntax is not correct.
http://www.mvps.org/access/forms/frm0031.htm

cel504 wrote:
Many thanks for your quick reponse and I understand what you are saying, will
this work if the subform is in a datasheet view? I have tried doing what you
suggested and it displays and error message.

Any further ideas, but I will keep trying.

Could anyone tell me, is it possible do a summary calculation of a subform
and show the results on the main form. If I have a form and there is a

[quoted text clipped - 3 lines]

Any ideas, on if this is possible. Many thanks.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1


  #6  
Old April 10th, 2008, 02:39 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Subform Calculations

Post back if you are still having problems.

cel504 wrote:
Once again many thanks for that and I will go over the it again and check it
out.

It should work just fine in Datasheet mode. Perhaps your reference to the
control syntax is not correct.

[quoted text clipped - 11 lines]

Any ideas, on if this is possible. Many thanks.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

  #7  
Old April 10th, 2008, 05:38 PM posted to microsoft.public.access.forms
cel504
external usenet poster
 
Posts: 39
Default Subform Calculations

It worked treat many thanks for you help. I am not sure if this is possible
or not, but if you enter data in a subform say, 2 items at £2.50 each can you
get it to calculate £5.00 as you enter it. I know you would normally do this
in a query, but just interested to see if is possible, that's all.

Once again, thanks for you help and time taken.

Cel

"ruralguy via AccessMonster.com" wrote:

Post back if you are still having problems.

cel504 wrote:
Once again many thanks for that and I will go over the it again and check it
out.

It should work just fine in Datasheet mode. Perhaps your reference to the
control syntax is not correct.

[quoted text clipped - 11 lines]

Any ideas, on if this is possible. Many thanks.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com


  #8  
Old April 10th, 2008, 07:11 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Subform Calculations

You can cause the calculating control to recalc in the AfterUpdate event of
the other control.

cel504 wrote:
It worked treat many thanks for you help. I am not sure if this is possible
or not, but if you enter data in a subform say, 2 items at £2.50 each can you
get it to calculate £5.00 as you enter it. I know you would normally do this
in a query, but just interested to see if is possible, that's all.

Once again, thanks for you help and time taken.

Cel

Post back if you are still having problems.

[quoted text clipped - 6 lines]

Any ideas, on if this is possible. Many thanks.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

  #9  
Old April 10th, 2008, 10:14 PM posted to microsoft.public.access.forms
cel504
external usenet poster
 
Posts: 39
Default Subform Calculations

I think I may have confused you a little, what I was trying to get my head
around was,if it is possible to have an extra column on the subform table and
as you completed say columm one with a number, column two with a rate and the
third column would display the calculation of the first two colums. I have
done this is a query, but only interested if it was possible in a table.

Many thanks, Cel.

"ruralguy via AccessMonster.com" wrote:

You can cause the calculating control to recalc in the AfterUpdate event of
the other control.

cel504 wrote:
It worked treat many thanks for you help. I am not sure if this is possible
or not, but if you enter data in a subform say, 2 items at £2.50 each can you
get it to calculate £5.00 as you enter it. I know you would normally do this
in a query, but just interested to see if is possible, that's all.

Once again, thanks for you help and time taken.

Cel

Post back if you are still having problems.

[quoted text clipped - 6 lines]

Any ideas, on if this is possible. Many thanks.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com


  #10  
Old April 10th, 2008, 10:56 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Subform Calculations

It is a calculated value and therefore should not be in a table. There are
no triggers in Access so there is nothing in the table to keep that field
accurate.

cel504 wrote:
I think I may have confused you a little, what I was trying to get my head
around was,if it is possible to have an extra column on the subform table and
as you completed say columm one with a number, column two with a rate and the
third column would display the calculation of the first two colums. I have
done this is a query, but only interested if it was possible in a table.

Many thanks, Cel.

You can cause the calculating control to recalc in the AfterUpdate event of
the other control.

[quoted text clipped - 13 lines]

Any ideas, on if this is possible. Many thanks.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1

 




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 07:44 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.