Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2007

Tip: Looking for answers? Try searching our database.

Expression returns blank rather than zero

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mr tom - 17 Jul 2007 11:52 GMT
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.
Allen Browne - 17 Jul 2007 11:57 GMT
Use Nz() to convert the Null into the desired value:

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

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Chaps,
>
[quoted text clipped - 11 lines]
>
> Cheers.
mr tom - 17 Jul 2007 12:12 GMT
Allen,

Thank you so much.

Was messing about with that for ages!

Cheers,

Tom.

> Use Nz() to convert the Null into the desired value:
>
[quoted text clipped - 15 lines]
> >
> > Cheers.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.