Calucation in Query

Novice1

Registered User.
Local time
Today, 09:07
Joined
Mar 9, 2004
Messages
385
I have a calculated field in a query. The calculation only works if the fields have values. This is what I used a the calculation:

PrimaryShareTotal: [Primary1Share]+[Primary2Share]+[Primary3Share]+[Primary4Share]

I tried using the Nz command

PrimaryShareTotal: Nz([Primary1Share]+[Primary2Share]+[Primary3Share]+[Primary4Share])

but this doesn't work.

Any help would be appreciated.
 
You would need to use the NZ function on each field.

Also, numerated field names (e.g. Primary1, Primary2, Primary3) screams of an improperly structured database. I think your real issue is a poor structure not the use of NZ. Most likely you need a new table to hold all these values that you want to add up.

If you can post your table structure I can help you further.
 

Users who are viewing this thread

Back
Top Bottom