TOTAL QUESTION

S

steve goodrich

On my form I want to add the total of three currency fields
I have created a text box and entered the line below (my field names)

=[SALARY]+[SHIFT ALLOWANCE]+[CONTRACTUAL OVERTIME]

The sum works fine if there is an amount in every field, it adds all 3
fields together and displays the total amount - which is what I want.
However if only 1 or 2 of the fields contain a value, the field will not
display anything at all.

What syntax do I need to enter, to display the total of all, or any one of
the 3

any help would be appreciated

Steve
 
T

tina

=Nz([SALARY], 0)+Nz([SHIFT ALLOWANCE], 0)+Nz([CONTRACTUAL OVERTIME], 0)

the above goes all on one line, regardless of how the newsreader may wrap it
here.
suggest you read up on the Nz() function in Access Help, so you'll
understand how it works.

hth
 
S

steve goodrich

Many thanks Tina
tina said:
=Nz([SALARY], 0)+Nz([SHIFT ALLOWANCE], 0)+Nz([CONTRACTUAL OVERTIME], 0)

the above goes all on one line, regardless of how the newsreader may wrap
it
here.
suggest you read up on the Nz() function in Access Help, so you'll
understand how it works.

hth


steve goodrich said:
On my form I want to add the total of three currency fields
I have created a text box and entered the line below (my field names)

=[SALARY]+[SHIFT ALLOWANCE]+[CONTRACTUAL OVERTIME]

The sum works fine if there is an amount in every field, it adds all 3
fields together and displays the total amount - which is what I want.
However if only 1 or 2 of the fields contain a value, the field will not
display anything at all.

What syntax do I need to enter, to display the total of all, or any one
of
the 3

any help would be appreciated

Steve
 
T

tina

you're welcome :)


steve goodrich said:
Many thanks Tina
tina said:
=Nz([SALARY], 0)+Nz([SHIFT ALLOWANCE], 0)+Nz([CONTRACTUAL OVERTIME], 0)

the above goes all on one line, regardless of how the newsreader may wrap
it
here.
suggest you read up on the Nz() function in Access Help, so you'll
understand how it works.

hth


steve goodrich said:
On my form I want to add the total of three currency fields
I have created a text box and entered the line below (my field names)

=[SALARY]+[SHIFT ALLOWANCE]+[CONTRACTUAL OVERTIME]

The sum works fine if there is an amount in every field, it adds all 3
fields together and displays the total amount - which is what I want.
However if only 1 or 2 of the fields contain a value, the field will not
display anything at all.

What syntax do I need to enter, to display the total of all, or any one
of
the 3

any help would be appreciated

Steve
 

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