adding together two fields

Tarah

New member
Local time
Today, 01:38
Joined
Aug 18, 2004
Messages
8
I am trying to add two fields together and then multiply that number by a third field within my report....the problem is that instead of adding the fields its making it one long number
field 1 - 2000 field 2- 3456 field 1 + field 2 = 20003456

please help!
 
This is happening because your storing your number fields as a text datatype so Access sees this two strings to concatenate together - not two numbers to add together.

To resolve this either change the fields datatypes to numbers and use the same equation you were using or use the val function like this:

txtResult = Val([Field1]) + Val([Field2) * Val([Field3])

HTH,
Kev
 
thanks a bunch!
 

Users who are viewing this thread

Back
Top Bottom