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  

Sum()



 
 
Thread Tools Display Modes
  #1  
Old November 4th, 2009, 04:39 PM posted to microsoft.public.access.forms
JimS
external usenet poster
 
Posts: 252
Default Sum()

I have a fairly simple form with a query as a control source. The query
includes two calculated columns. They work perfectly. When I change one of
the fields in the row that's part of the calculation, the calculated columns
recalculate and redisplay no problem.

My issue is that in the header (and footer) of the form, I have a text box
whose control source is simply sum(TotLabor), where TotLabor is one of the
displayed calculated columns. I've changed the name of the text box for that
column to "tbTotLabor" so there won't be any confusion (damned Access for
naming them that way....) Still, whether I use 'Sum(tbTotLabor)' or
'Sum(TotLabor)', I get a #Error consistently. (A2007)

Ideas?
--
Jim
  #2  
Old November 4th, 2009, 04:51 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Sum()

Try this --
=Sum(TotLabor)

--
Build a little, test a little.


"JimS" wrote:

I have a fairly simple form with a query as a control source. The query
includes two calculated columns. They work perfectly. When I change one of
the fields in the row that's part of the calculation, the calculated columns
recalculate and redisplay no problem.

My issue is that in the header (and footer) of the form, I have a text box
whose control source is simply sum(TotLabor), where TotLabor is one of the
displayed calculated columns. I've changed the name of the text box for that
column to "tbTotLabor" so there won't be any confusion (damned Access for
naming them that way....) Still, whether I use 'Sum(tbTotLabor)' or
'Sum(TotLabor)', I get a #Error consistently. (A2007)

Ideas?
--
Jim

  #3  
Old November 4th, 2009, 05:01 PM posted to microsoft.public.access.forms
JimS
external usenet poster
 
Posts: 252
Default Sum()

My mistake. That is the syntax I'm using. =Sum(TotLabor). I actually built it
with the wizard so I wouldn't spell something wrong or something equally
stupid.
--
Jim


"KARL DEWEY" wrote:

Try this --
=Sum(TotLabor)

--
Build a little, test a little.


"JimS" wrote:

I have a fairly simple form with a query as a control source. The query
includes two calculated columns. They work perfectly. When I change one of
the fields in the row that's part of the calculation, the calculated columns
recalculate and redisplay no problem.

My issue is that in the header (and footer) of the form, I have a text box
whose control source is simply sum(TotLabor), where TotLabor is one of the
displayed calculated columns. I've changed the name of the text box for that
column to "tbTotLabor" so there won't be any confusion (damned Access for
naming them that way....) Still, whether I use 'Sum(tbTotLabor)' or
'Sum(TotLabor)', I get a #Error consistently. (A2007)

Ideas?
--
Jim

  #4  
Old November 4th, 2009, 05:16 PM posted to microsoft.public.access.forms
JimS
external usenet poster
 
Posts: 252
Default Sum()

Now, here's a kicker. I put a new text box on the form footer to experiment.
If I use dsum() instead of sum(), it works:

=DSum("TotLabor","qryBoMDetailbyWO",[Filter])

Is that even close to sensible?
--
Jim


"KARL DEWEY" wrote:

Try this --
=Sum(TotLabor)

--
Build a little, test a little.


"JimS" wrote:

I have a fairly simple form with a query as a control source. The query
includes two calculated columns. They work perfectly. When I change one of
the fields in the row that's part of the calculation, the calculated columns
recalculate and redisplay no problem.

My issue is that in the header (and footer) of the form, I have a text box
whose control source is simply sum(TotLabor), where TotLabor is one of the
displayed calculated columns. I've changed the name of the text box for that
column to "tbTotLabor" so there won't be any confusion (damned Access for
naming them that way....) Still, whether I use 'Sum(tbTotLabor)' or
'Sum(TotLabor)', I get a #Error consistently. (A2007)

Ideas?
--
Jim

  #5  
Old November 4th, 2009, 05:21 PM posted to microsoft.public.access.forms
JimS
external usenet poster
 
Posts: 252
Default Sum()

OK, now, I'm flumoxed. Suddenly, everything works flawlessly. Both the =Sum()
syntax and the =dSum() syntax suddenly start working. WTF? I didn't even
close the form!
--
Jim


"KARL DEWEY" wrote:

Try this --
=Sum(TotLabor)

--
Build a little, test a little.


"JimS" wrote:

I have a fairly simple form with a query as a control source. The query
includes two calculated columns. They work perfectly. When I change one of
the fields in the row that's part of the calculation, the calculated columns
recalculate and redisplay no problem.

My issue is that in the header (and footer) of the form, I have a text box
whose control source is simply sum(TotLabor), where TotLabor is one of the
displayed calculated columns. I've changed the name of the text box for that
column to "tbTotLabor" so there won't be any confusion (damned Access for
naming them that way....) Still, whether I use 'Sum(tbTotLabor)' or
'Sum(TotLabor)', I get a #Error consistently. (A2007)

Ideas?
--
Jim

 




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:34 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.