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

tough one regarding adding two columns :)



 
 
Thread Tools Display Modes
  #1  
Old June 26th, 2008, 11:13 AM posted to microsoft.public.access.queries
Accessghostrider via AccessMonster.com
external usenet poster
 
Posts: 13
Default tough one regarding adding two columns :)

Hi

I have a table with one row of data and 10 columns that are all total
figures of a previous table. example is below:

Sum1 sum 2 sum3
2 49 0 etc etc

I tried to create a new query to add sum1 together with sum2 to create a new
total figure using this:
Total of sum1 and sum2: [sum1]+[sum2]

for some reason it says it needs to be part of an aggregate function. I have
other fields in the query besides this however, and they calculate sums from
another table.

Any help would be great

Thanks

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200806/1

  #2  
Old June 26th, 2008, 12:53 PM posted to microsoft.public.access.queries
scubadiver
external usenet poster
 
Posts: 1,673
Default tough one regarding adding two columns :)


Your question doesn't mean anything. If can post your table structure and
how you arrived at your query that would be great.

"Accessghostrider via AccessMonster.com" wrote:

Hi

I have a table with one row of data and 10 columns that are all total
figures of a previous table. example is below:

Sum1 sum 2 sum3
2 49 0 etc etc

I tried to create a new query to add sum1 together with sum2 to create a new
total figure using this:
Total of sum1 and sum2: [sum1]+[sum2]

for some reason it says it needs to be part of an aggregate function. I have
other fields in the query besides this however, and they calculate sums from
another table.

Any help would be great

Thanks

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200806/1


  #3  
Old June 26th, 2008, 01:22 PM posted to microsoft.public.access.queries
Accessghostrider via AccessMonster.com
external usenet poster
 
Posts: 13
Default tough one regarding adding two columns :)

scubadiver wrote:
Your question doesn't mean anything. If can post your table structure and
how you arrived at your query that would be great.

Hi

[quoted text clipped - 15 lines]

Thanks


? I posted the fields and the figures and what i wanted?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200806/1

  #4  
Old June 26th, 2008, 01:38 PM posted to microsoft.public.access.queries
scubadiver
external usenet poster
 
Posts: 1,673
Default tough one regarding adding two columns :)


"I have a table with one row of data and 10 columns that are all total
figures of a previous table."

Does this mean you have 10 fields with a totals query (which suggests
non-normalisation) or is it a cross tab query?

That you have an error message tells me something is obviously wrong
somewhere.

"Accessghostrider via AccessMonster.com" wrote:

scubadiver wrote:
Your question doesn't mean anything. If can post your table structure and
how you arrived at your query that would be great.

Hi

[quoted text clipped - 15 lines]

Thanks


? I posted the fields and the figures and what i wanted?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200806/1


  #5  
Old June 26th, 2008, 01:46 PM posted to microsoft.public.access.queries
Accessghostrider via AccessMonster.com
external usenet poster
 
Posts: 13
Default tough one regarding adding two columns :)

scubadiver wrote:
"I have a table with one row of data and 10 columns that are all total
figures of a previous table."

Does this mean you have 10 fields with a totals query (which suggests
non-normalisation) or is it a cross tab query?

That you have an error message tells me something is obviously wrong
somewhere.

Your question doesn't mean anything. If can post your table structure and
how you arrived at your query that would be great.

[quoted text clipped - 6 lines]

? I posted the fields and the figures and what i wanted?



heres the table, i did give an example in the first post:

column name: sum1 sum2 sum3 sum4 sum5 sum6 sum7 sum8 sum9 sum10
Record figu 2 5 6 49 66 75 3 5
8 20

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

  #6  
Old June 26th, 2008, 02:04 PM posted to microsoft.public.access.queries
scubadiver
external usenet poster
 
Posts: 1,673
Default tough one regarding adding two columns :)


I *think* your error is coming from the fact that you are trying to sum
columns that have been previously summed.

What I think you should do is calculate the total on the original scores and
then use that as the source for the second table. I think that should work.

"Accessghostrider via AccessMonster.com" wrote:

scubadiver wrote:
"I have a table with one row of data and 10 columns that are all total
figures of a previous table."

Does this mean you have 10 fields with a totals query (which suggests
non-normalisation) or is it a cross tab query?

That you have an error message tells me something is obviously wrong
somewhere.

Your question doesn't mean anything. If can post your table structure and
how you arrived at your query that would be great.

[quoted text clipped - 6 lines]

? I posted the fields and the figures and what i wanted?



heres the table, i did give an example in the first post:

column name: sum1 sum2 sum3 sum4 sum5 sum6 sum7 sum8 sum9 sum10
Record figu 2 5 6 49 66 75 3 5
8 20

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


  #7  
Old June 26th, 2008, 02:14 PM posted to microsoft.public.access.queries
scubadiver
external usenet poster
 
Posts: 1,673
Default tough one regarding adding two columns :)


Remember that if you have fields for individual scores then there must be a
good reason for it because, strictly, it isn't properly normalised. If you
have the scores in separate records within one table then you will find it so
much easier to add them up!


"Accessghostrider via AccessMonster.com" wrote:

scubadiver wrote:
"I have a table with one row of data and 10 columns that are all total
figures of a previous table."

Does this mean you have 10 fields with a totals query (which suggests
non-normalisation) or is it a cross tab query?

That you have an error message tells me something is obviously wrong
somewhere.

Your question doesn't mean anything. If can post your table structure and
how you arrived at your query that would be great.

[quoted text clipped - 6 lines]

? I posted the fields and the figures and what i wanted?



heres the table, i did give an example in the first post:

column name: sum1 sum2 sum3 sum4 sum5 sum6 sum7 sum8 sum9 sum10
Record figu 2 5 6 49 66 75 3 5
8 20

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


  #8  
Old June 26th, 2008, 02:30 PM posted to microsoft.public.access.queries
Accessghostrider via AccessMonster.com
external usenet poster
 
Posts: 13
Default tough one regarding adding two columns :)

scubadiver wrote:
Remember that if you have fields for individual scores then there must be a
good reason for it because, strictly, it isn't properly normalised. If you
have the scores in separate records within one table then you will find it so
much easier to add them up!

"I have a table with one row of data and 10 columns that are all total
figures of a previous table."

[quoted text clipped - 16 lines]
Record figu 2 5 6 49 66 75 3 5
8 20


Scuba cheers for looking into this. The error is most likely that i am
trying to add two already summed figures together i worked around this by not
creating the summed table and going off a few more columns. Pointless me
writing what i found as its not useful however if anyone ever reads this
heres a helpful formula when summing up things:

Sum(IIf([Variable]="Yes",[Field to be summed],"0"))

kind regards

ghost

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/200806/1

  #9  
Old June 26th, 2008, 02:34 PM posted to microsoft.public.access.queries
Accessghostrider via AccessMonster.com
external usenet poster
 
Posts: 13
Default tough one regarding adding two columns :)

Whoops, forgot to mention that the formula above lets you say only count a
field if another field has a value that you want.

Ghost

Accessghostrider wrote:
Remember that if you have fields for individual scores then there must be a
good reason for it because, strictly, it isn't properly normalised. If you

[quoted text clipped - 6 lines]
Record figu 2 5 6 49 66 75 3 5
8 20


Scuba cheers for looking into this. The error is most likely that i am
trying to add two already summed figures together i worked around this by not
creating the summed table and going off a few more columns. Pointless me
writing what i found as its not useful however if anyone ever reads this
heres a helpful formula when summing up things:

Sum(IIf([Variable]="Yes",[Field to be summed],"0"))

kind regards

ghost


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

 




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 05:28 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.