Dcount Again

  • Thread starter Thread starter Little Penny
  • Start date Start date
L

Little Penny

How do I add the value of these two dcount statements into one textbox. And if no records than display a zero



=Nz(DCount("OperatingSystem","CountW2KPBCC"),0)

=Nz(DCount("OperatingSystem","CountW2KPB200"),0)


Thank you
 
Little Penny said:
How do I add the value of these two dcount statements into one textbox.
And if no records than display a zero



=Nz(DCount("OperatingSystem","CountW2KPBCC"),0)

=Nz(DCount("OperatingSystem","CountW2KPB200"),0)



=Nz(DCount("OperatingSystem","CountW2KPBCC")+DCount("OperatingSystem","CountW2KPB200"),0)


Tom Lake
 
How do I add the value of these two dcount statements into one textbox. And if no records than display a zero



=Nz(DCount("OperatingSystem","CountW2KPBCC"),0)

=Nz(DCount("OperatingSystem","CountW2KPB200"),0)

Just add them:

=Nz(DCount("OperatingSystem","CountW2KPBCC"),0) +
Nz(DCount("OperatingSystem","CountW2KPB200"),0)

You do need to do the NZ() first and add the NZ() calls; otherwise if
one DCount is null, the whole expression will be NULL and you'll lose
the other real value.

John W. Vinson[MVP]
 
Back
Top