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 / New Users / April 2005

Tip: Looking for answers? Try searching our database.

subrtraction - to work out variance

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
liz - 20 Apr 2005 15:16 GMT
I want to do A-B=C but I want the value of C to read as 0 as long as there is
no value in the B coulmn.

HELP ME !!!!!!!
Ed Warren - 20 Apr 2005 18:13 GMT
In a query:

SELECT A, B, IIf(IsNull([b])=True,0,[a]-[b]) AS C
FROM Table1;

"in English"  if the field b is null then return 0, otherwise return field
a - field b.
 Query1 A B C
     1 1 0
     2 0 2
     3
    0
     4 5 -1

    0

Ed Warren

>I want to do A-B=C but I want the value of C to read as 0 as long as there
>is
> no value in the B coulmn.
>
> HELP ME !!!!!!!
 
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.