Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / October 2005

Tip: Looking for answers? Try searching our database.

Summation Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
qkimchi - 28 Oct 2005 01:04 GMT
 Please help.
I have 7 values entered by user using a form.  I want to add those values
that are displayed as a total in a report.  Here is my code:
=sum(Nz([queryname]![value1],0)
        +Nz([queryname]![value3],0)
        +Nz([queryname]![value4],0)
        +Nz([queryname]![value5],0)
        +Nz([queryname]![value6],0)
        +Nz([queryname]![value7],0)
        +Nz([queryname]![value2],0))

It works if I only have 6 values but if I have more than 6 values it gives me
an error. My report doesn't run.
Thank you.
Duane Hookom - 28 Oct 2005 03:53 GMT
Is there a reason why you have the queryname in the expression?

Signature

Duane Hookom
MS Access MVP

>  Please help.
> I have 7 values entered by user using a form.  I want to add those values
[quoted text clipped - 11 lines]
> an error. My report doesn't run.
> Thank you.
qkimchi - 28 Oct 2005 17:01 GMT
I changed it to table name but still.  It only takes one more value.  I need
to add more.
Thank you very much.

>Is there a reason why you have the queryname in the expression?
>
[quoted text clipped - 3 lines]
>> an error. My report doesn't run.
>> Thank you.
Duane Hookom - 28 Oct 2005 20:25 GMT
I would not expect that you would need any table or query name:
=sum(Nz([value1],0)+Nz([value3],0)+Nz([value4],0)+Nz([value5],0)
        +Nz([value6],0)+Nz([value7],0)+Nz([value2],0))

Adding values across sometimes suggests un-normalized tables.
Signature

Duane Hookom
MS Access MVP
--

>I changed it to table name but still.  It only takes one more value.  I
>need
[quoted text clipped - 9 lines]
>>> an error. My report doesn't run.
>>> Thank you.
qkimchi - 30 Oct 2005 05:41 GMT
Yepeee!!   It works!!  Thank you so much..

>I would not expect that you would need any table or query name:
>=sum(Nz([value1],0)+Nz([value3],0)+Nz([value4],0)+Nz([value5],0)
[quoted text clipped - 6 lines]
>>>> an error. My report doesn't run.
>>>> Thank you.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.