Sum "0" Values...

gray8015

Registered User.
Local time
Today, 16:10
Joined
Jul 26, 2010
Messages
10
Hi, I'll try to explain this briefly...
I have a database that tracks rugby games over many seasons. All works well until I try to create a grand total of points for each player. As the values associated with tries, penalties, etc have chnaged over the years, I store the values based on the season played.
My report shows PlayerName, Tries, Conversions, Penalties, DropGoals and sums the values for each player. Now I would like to sum ALL of the points for each player. It works fine if the player has at least 1 of all of the above - but that's not normally the case. As soon as Access hits a blank value (if the player scored no penalties), the result is a blank in the TotalPoints column.
I know this is a bit complicated.
I have copied a small sample which works only if Tries and Conversions are both greater than 0:
=([Tries]*[TryValue])+([Conversions]*[ConversionValue])
Any suggestions? Thanks for your time. Kind regards...
 
Use the NZ function:
Code:
=(Nz([Tries],0)*Nz([TryValue],0))+(Nz([Conversions],0)*Nz([ConversionValue],0))
 
Try using the NZ function. See below.What it does is replace the null value with a chosen default value.Note: It doesn't have to be 0.=(Nz([Tries],0)*Nz([TryValue],0))+(Nz([Conversions],0)*Nz([ConversionValue],0))
 

Users who are viewing this thread

Back
Top Bottom