tough one regarding adding two columns :)

  • Thread starter Accessghostrider via AccessMonster.com
  • Start date
A

Accessghostrider via AccessMonster.com

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
 
S

scubadiver

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

scubadiver

"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 said:
scubadiver said:
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 - 15 lines]

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

Accessghostrider via AccessMonster.com

scubadiver said:
"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.
[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 figure: 2 5 6 49 66 75 3 5
8 20
 
S

scubadiver

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 said:
scubadiver said:
"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 figure: 2 5 6 49 66 75 3 5
8 20
 
S

scubadiver

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 said:
scubadiver said:
"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 figure: 2 5 6 49 66 75 3 5
8 20
 
A

Accessghostrider via AccessMonster.com

scubadiver said:
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!
[quoted text clipped - 16 lines]
Record figure: 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
 
A

Accessghostrider via AccessMonster.com

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
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]
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top