sum of the fields (1 Viewer)

totolkhan

Registered User.
Local time
Today, 04:32
Joined
May 23, 2005
Messages
30
hi ,
if i have 3 number fields , [field1] , [field2], [field3] how can i get sum of them in another field but with this if that i'll have not to enter every one of them a value .

for example
field1 = 10
field2 = (empty)
field3 = 5

field4 = [sum of 1+2+3 ] => 10+0+5 = 15

how can i do it ?!
in form and report

thanks
 

trucktime

Registered User.
Local time
Today, 05:32
Joined
Oct 24, 2004
Messages
556
Sum

Set the Control Source of Field 4 to:
=[Field1]+[Field2]+[Field3]

Set the default value for fields 1,2 & 3 to '0'
 

ScottGem

Registered User.
Local time
Today, 07:32
Joined
Jun 20, 2005
Messages
1,119
totolkhan said:
hi ,
if i have 3 number fields , [field1] , [field2], [field3] how can i get sum of them in another field but with this if that i'll have not to enter every one of them a value .

for example
field1 = 10
field2 = (empty)
field3 = 5

field4 = [sum of 1+2+3 ] => 10+0+5 = 15

how can i do it ?!
in form and report

thanks

If its possible for some of the fields to be empty use:

=Nz([field1],0) + Nz([field2],0) + Nz([field3],0)

Also this value shouldn't be stored since you can use that expression to calculate it wherever you need it.
 

Users who are viewing this thread

Top Bottom