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 / Queries / November 2007

Tip: Looking for answers? Try searching our database.

Sum of Amount

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shirley - 08 Nov 2007 20:15 GMT
Hi,

I have a query which sums the invoiced amounts on a purchase order.  If
there is no invoiced amounts, it leaves a blank field.  How do I write the
query so that the blank field is replaced with a zero (0)?

Thanks,
Shirley
Signature

Shirley

Ofer Cohen - 08 Nov 2007 20:48 GMT
The Nz function will replace Null to Zero

Nz([FieldName],0)

That might not be the case, but from your post I can't see which tables
involved or what is the join between them.

If you need more help, please post the SQL.

Signature

Good Luck
BS"D

> Hi,
>
[quoted text clipped - 4 lines]
> Thanks,
> Shirley
Shirley - 08 Nov 2007 21:28 GMT
Thanks for the response, but it's not working.  Here is the SQL:

SELECT [PO Query].Project, [PO Query].[PO No], [PO Query].[PO Date], [PO
Query].[Vendor Name], [PO Query].[Sum(amount)], [AP Query].[Sum Of Amount]
FROM [PO Query] LEFT JOIN [AP Query] ON [PO Query].[PO No] = [AP Query].[PO
No]
GROUP BY [PO Query].Project, [PO Query].[PO No], [PO Query].[PO Date], [PO
Query].[Vendor Name], [PO Query].[Sum(amount)], [AP Query].[Sum Of Amount];

Can you still help?
Signature

Shirley

> Hi,
>
[quoted text clipped - 4 lines]
> Thanks,
> Shirley
Ofer Cohen - 08 Nov 2007 21:56 GMT
Have you tried

SELECT [PO Query].Project, [PO Query].[PO No], [PO Query].[PO Date], [PO
Query].[Vendor Name], nz([PO Query].[Sum(amount)],0), Nz([AP Query].[Sum Of
Amount],0)
FROM [PO Query] LEFT JOIN [AP Query] ON [PO Query].[PO No] = [AP Query].[PO
No]
GROUP BY [PO Query].Project, [PO Query].[PO No], [PO Query].[PO Date], [PO
Query].[Vendor Name], [PO Query].[Sum(amount)], [AP Query].[Sum Of Amount];

Signature

Good Luck
BS"D

> Thanks for the response, but it's not working.  Here is the SQL:
>
[quoted text clipped - 15 lines]
> > Thanks,
> > Shirley
 
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.