Adding help

Mattymatt79

Paintball Guy
Local time
Today, 12:40
Joined
Apr 23, 2002
Messages
46
Ok, again another probably really easy question
im trying to add a bunch of fields together to get a total of all the numbers
whenever i do it, it gives me the numbers right next to each other.
if i do any other kind of function it does it, but the addition one just puts the numbers right next to each other
any thing im doing wrong?
 
Are your numbers actually numeric fields, or are they text numbers?
Are you using + or & for addition?

Either of the latter could cause problems. Maybe post an example of what you're doing.
 
all im doing is adding a few fields that have numeric values together
like imputing the ammount of people involved and stuff and its through i think 4 fields and i want to total it
no matter how i word the expression it just puts the numbers back to back to back.
the multiplication and subtraction and division work perfectly dont know what im doing when it comes to addition
 
I think what David meant was post the expression that's not working so we can see what you have

have you tried

= Sum([text1]+[text2]+[text3]+[text4])
 
the function im using is this

sum[total]=[udp/deployed]+[forwardbased]+[forwardstationed]+[deployedfortraining]

every time ive changed it, i continue to get the number next to each other... but if i change + to - or * or / it works but not with the adding... i still cant figure out what im doing wrong
 
Have you managed to solve this yet? If not, and the database isn't too big, send it on and I'll have a fiddle.
 
i cant send the database... its on a seceret site and i just plain cant
ill write down here exactly what im trying to do


the query is all taken from the same table
now maybe where im screwing up is the grouping of the numbers


the fields are correct i pulled them right off the table list.

udp/deployed forwardS forwardB Deployed
global global global global
sum sum sum sum


now the expression im using is
expr1: sum([total]=[udp/deployed]+[forwardS]+[forwardB]+[Deployed])


ok now whenever i take out the + and change it with - / * it works the numbers compute correctly... now what the heck am i doing to make it put the numbers all next to each other? it puts it into the total field like i want it too, but it puts them together?
im not using the & or and im just using the + what am i doing wrong? im pulling out my hair about this... well what little hair i have
 
Is this a query field, Matt? Try:
SumTotal: [udp/deployed]+[forwardS]+[forwardB]+[Deployed]

"Expr1" is the default name for a calculated expression in an Access Query. The colon separates the 'name' from the calculation.

As Pat said, Sum() is not what you want in this case I don't believe. If the above doesn't work and you're dealing with text fields, not numeric, then try surrounding each one with Val(). That'll definitely convert them to numbers, if it can.

[This message has been edited by David R (edited 04-29-2002).]
 
tried the Val() and the totalsum() neither worked... i have no idea i must have done something totally screwed up and i really dont know how to fix it... sad i cant even do an add query
 
Your problem is as other have already pointed out. The fields you are trying to add together are text fields. You can't do an add query with text fields. Change them to numeric fields and I am 99% sure it will work.

I had the same problem.

Scott.
 

Users who are viewing this thread

Back
Top Bottom