Expression returns blank rather than zero

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Chaps,

I've got the following expression (in a form):

=DLookUp("[Count]","WeeklyWFReport","[ReportGroup]=5")

When there is nothing to return, rather than returning a zero, it returns
nothing.

Unfortunately, this messes up validation and calculations further down the
lines.

Anybody know how I can get around this?

Cheers.
 
Use Nz() to convert the Null into the desired value:

=Nz(DLookUp("[Count]","WeeklyWFReport","[ReportGroup]=5"), 0)
 
Allen,

Thank you so much.

Was messing about with that for ages!

Cheers,

Tom.

Allen Browne said:
Use Nz() to convert the Null into the desired value:

=Nz(DLookUp("[Count]","WeeklyWFReport","[ReportGroup]=5"), 0)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

mr tom said:
Chaps,

I've got the following expression (in a form):

=DLookUp("[Count]","WeeklyWFReport","[ReportGroup]=5")

When there is nothing to return, rather than returning a zero, it returns
nothing.

Unfortunately, this messes up validation and calculations further down the
lines.

Anybody know how I can get around this?

Cheers.
 
Back
Top