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 / August 2005

Tip: Looking for answers? Try searching our database.

Handling Nulls when adding fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dylan Moran - 05 Aug 2005 06:21 GMT
I want to do some currency calulcations on fields on a form and handle any
nulls.

I have read the help and am having some troubles.

Formuals is:

=Nz([SalesRevenue]-[ABCExpense]-[XYZExpense],0)

With a null value in the fields ABCExpense or XYZExpense, the result is 0.

Your assistance is appreciated.

Signature

I may not know VBA inside out, but from the outside I am looking in.
Dylan Moran - Melbourne Australia

Dirk Goldgar - 05 Aug 2005 06:30 GMT
> I want to do some currency calulcations on fields on a form and
> handle any nulls.
[quoted text clipped - 9 lines]
>
> Your assistance is appreciated.

You need to wrap each field in Nz, not the whole expression.  Like this:

   =Nz([SalesRevenue], 0)-Nz([ABCExpense], 0)-Nz([XYZExpense],0)

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Dylan Moran - 05 Aug 2005 06:36 GMT
Many thanks.

> > I want to do some currency calulcations on fields on a form and
> > handle any nulls.
[quoted text clipped - 13 lines]
>
>     =Nz([SalesRevenue], 0)-Nz([ABCExpense], 0)-Nz([XYZExpense],0)
 
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.