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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#error when calculating sum



 
 
Thread Tools Display Modes
  #1  
Old November 9th, 2005, 01:50 PM
dstaade
external usenet poster
 
Posts: n/a
Default #error when calculating sum

I keep getting a #error when trying to calculate the sum in my report. I've
made sure the textboxes have different names. The problem I think I have is
the report gets the data from a query.(I only want records between certain
dates.) I've checked my 'way' of summing with the sample database and it is
spot on.

Is there something that I have missed?

By the way I am new, so be gentle.
  #2  
Old November 9th, 2005, 01:54 PM
BruceM
external usenet poster
 
Posts: n/a
Default #error when calculating sum

Are you trying to sum something other than a Number field? What are you
doing to calculate the sum?

"dstaade" wrote in message
...
I keep getting a #error when trying to calculate the sum in my report. I've
made sure the textboxes have different names. The problem I think I have
is
the report gets the data from a query.(I only want records between certain
dates.) I've checked my 'way' of summing with the sample database and it
is
spot on.

Is there something that I have missed?

By the way I am new, so be gentle.



  #3  
Old November 9th, 2005, 02:07 PM
dstaade
external usenet poster
 
Posts: n/a
Default #error when calculating sum

I am using

=Sum([txtrepQuantity]) 'for the control on the summed textbox
(tried the Nz() but no change)

txtrepQuantity 'for the text box in the report
txtfrmQuantity 'for the text box in the form
Quantity 'for the name of the field in the table

Quantity is a number(Long Integer)


"BruceM" wrote:

Are you trying to sum something other than a Number field? What are you
doing to calculate the sum?

"dstaade" wrote in message
...
I keep getting a #error when trying to calculate the sum in my report. I've
made sure the textboxes have different names. The problem I think I have
is
the report gets the data from a query.(I only want records between certain
dates.) I've checked my 'way' of summing with the sample database and it
is
spot on.

Is there something that I have missed?

By the way I am new, so be gentle.




  #4  
Old November 9th, 2005, 02:21 PM
Tom Lake
external usenet poster
 
Posts: n/a
Default #error when calculating sum

"dstaade" wrote in message
...
I keep getting a #error when trying to calculate the sum in my report. I've
made sure the textboxes have different names. The problem I think I have
is
the report gets the data from a query.(I only want records between certain
dates.) I've checked my 'way' of summing with the sample database and it
is
spot on.

Is there something that I have missed?

By the way I am new, so be gentle.


Is your Sum calculation is in a report footer or section footer? If not (if
it's in the Detail section for example)
it won't work.

Tom Lake


  #5  
Old November 9th, 2005, 02:40 PM
dstaade
external usenet poster
 
Posts: n/a
Default #error when calculating sum

I've tried using it in the page footer, which results in the #error, and in
the report footer, which results in me having to enter a number for
txtrepQuantity and then is used for every record and gives me a multiple of
the value entered.


"Tom Lake" wrote:

"dstaade" wrote in message
...
I keep getting a #error when trying to calculate the sum in my report. I've
made sure the textboxes have different names. The problem I think I have
is
the report gets the data from a query.(I only want records between certain
dates.) I've checked my 'way' of summing with the sample database and it
is
spot on.

Is there something that I have missed?

By the way I am new, so be gentle.


Is your Sum calculation is in a report footer or section footer? If not (if
it's in the Detail section for example)
it won't work.

Tom Lake



  #6  
Old November 9th, 2005, 02:47 PM
Tom Lake
external usenet poster
 
Posts: n/a
Default #error when calculating sum


"dstaade" wrote in message
...
I've tried using it in the page footer, which results in the #error, and
in
the report footer, which results in me having to enter a number for
txtrepQuantity and then is used for every record and gives me a multiple
of
the value entered.


If you're trying to sum a calculated amount (qty*price for example) you have
to repeat the
calculation in the Sum function.

If the following fields are in the Detail section:

Qty Unit Price Total(=[Qty]*[Unit Price])

and you want to sum Total, you have to do this:

Sum([Qty]*[Unit Price])

rather than Sum([Total])

Tom Lake



  #7  
Old November 9th, 2005, 02:48 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default #error when calculating sum

You can't Sum() a text box or other control. You can Sum() an expression
using the fields from the report's record source. I assume txtrepQuantity is
the name of a text box. If this is so, it won't work.

You can use an expression like:
=Sum([Freight] + [Qty] * [UnitPrice] - [Discount])

--
Duane Hookom
MS Access MVP
--

"dstaade" wrote in message
...
I've tried using it in the page footer, which results in the #error, and
in
the report footer, which results in me having to enter a number for
txtrepQuantity and then is used for every record and gives me a multiple
of
the value entered.


"Tom Lake" wrote:

"dstaade" wrote in message
...
I keep getting a #error when trying to calculate the sum in my report.
I've
made sure the textboxes have different names. The problem I think I
have
is
the report gets the data from a query.(I only want records between
certain
dates.) I've checked my 'way' of summing with the sample database and
it
is
spot on.

Is there something that I have missed?

By the way I am new, so be gentle.


Is your Sum calculation is in a report footer or section footer? If not
(if
it's in the Detail section for example)
it won't work.

Tom Lake





  #8  
Old November 9th, 2005, 02:57 PM
dstaade
external usenet poster
 
Posts: n/a
Default #error when calculating sum

Duane,

You're right that what I was doing wrong.

Thanks.

"Duane Hookom" wrote:

You can't Sum() a text box or other control. You can Sum() an expression
using the fields from the report's record source. I assume txtrepQuantity is
the name of a text box. If this is so, it won't work.

You can use an expression like:
=Sum([Freight] + [Qty] * [UnitPrice] - [Discount])

--
Duane Hookom
MS Access MVP
--

"dstaade" wrote in message
...
I've tried using it in the page footer, which results in the #error, and
in
the report footer, which results in me having to enter a number for
txtrepQuantity and then is used for every record and gives me a multiple
of
the value entered.


"Tom Lake" wrote:

"dstaade" wrote in message
...
I keep getting a #error when trying to calculate the sum in my report.
I've
made sure the textboxes have different names. The problem I think I
have
is
the report gets the data from a query.(I only want records between
certain
dates.) I've checked my 'way' of summing with the sample database and
it
is
spot on.

Is there something that I have missed?

By the way I am new, so be gentle.

Is your Sum calculation is in a report footer or section footer? If not
(if
it's in the Detail section for example)
it won't work.

Tom Lake






 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating recurring date in following month, calculating # days in that period Walterius Worksheet Functions 6 June 4th, 2005 11:21 PM
Calculating one record/Form Tiffany Using Forms 2 May 27th, 2005 04:06 AM
calculating excel spreadsheet files for pensions and life insurance (including age calculation sheets) RICHARD Worksheet Functions 1 March 15th, 2005 05:49 PM
AGE CALCULATING EXCEL SPREADSHEETS AND OTHERS! RICHARD General Discussion 0 March 1st, 2005 01:53 PM
Report calculating Paula Setting Up & Running Reports 1 January 28th, 2005 02:40 AM


All times are GMT +1. The time now is 09:08 AM.


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