Sum of 3 Calculated Fields

duesouth

Registered User.
Local time
Today, 09:40
Joined
Oct 1, 2010
Messages
11
I have 3 calculated fields in a query and another number from a table which I wish to add together.

When I build [query1]+[query2]+[query3]+[table1] Access brings back all the number together in a string (i.e. 10+10+10+10 = 10101010).

Presumably I need to add something to the expression to make it work?
 
Your data type for your columns is set to text....change it to number and try again.

You will have to do this in the table design view - ensure all the content of your field is a number before you do this - otherwise you may find it hard.
 
Perhaps you might want to convert each value to a number.
Code:
clng([query1])+clng([query2])+clng([query3])+clng([table1])
HTH:D
 
I would still check your datatypes to ensure that they are number datatypes (as mcclunyboy pointed). You will be performing unecessary operations having to cast to Long all the time.

If they are ALL of Number datatype and it still doesn't work without CLng() then by all means use it :)
 

Users who are viewing this thread

Back
Top Bottom