Expression returns blank rather than zero

M

mr tom

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.
 
A

Allen Browne

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

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

mr tom

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.
 

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