A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#error ????



 
 
Thread Tools Display Modes
  #1  
Old March 13th, 2005, 05:39 AM
Dave Elliott
external usenet poster
 
Posts: n/a
Default #error ????

In a report I have this syntax which calculates the total Net Profit
If the value IsNull (no Data) then it gives me the #error in the field
How can I eliminate this? (Currency Format)

=Sum([NetAfterCom])-[Reports]![RProfitLoss]![RProfitLossSub].[Report]![SumOftxtRate]


  #2  
Old March 13th, 2005, 05:48 AM
Steve Schapel
external usenet poster
 
Posts: n/a
Default

Dave,

The value is not Null. It is non-existent.

Try it like this...

=Sum([NetAfterCom])-IIf([RProfitLossSub].Report.HasData,[RProfitLossSub]![SumOftxtRate],0)

--
Steve Schapel, Microsoft Access MVP


Dave Elliott wrote:
In a report I have this syntax which calculates the total Net Profit
If the value IsNull (no Data) then it gives me the #error in the field
How can I eliminate this? (Currency Format)

=Sum([NetAfterCom])-[Reports]![RProfitLoss]![RProfitLossSub].[Report]![SumOftxtRate]


  #3  
Old March 13th, 2005, 05:52 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

Try this:
=Nz(Sum([NetAfterCom]),0) - IIf([RProfitLossSub].[Report].HasData,
Nz([RProfitLossSub].[Report]![SumOftxtRate],0), 0)

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

"Dave Elliott" wrote in message
om...
In a report I have this syntax which calculates the total Net Profit
If the value IsNull (no Data) then it gives me the #error in the field
How can I eliminate this? (Currency Format)

=Sum([NetAfterCom])-[Reports]![RProfitLoss]![RProfitLossSub].[Report]![SumOftxtRate]



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Backing Database GOL General Discussion 4 January 28th, 2005 03:32 PM
Error message different in MDB and MDE david epsom dot com dot au General Discussion 1 September 21st, 2004 12:47 AM
Help, i'm gettiing error: Access has encountered a problem and needs to close... betsy General Discussion 0 September 14th, 2004 08:20 PM
Expression - calculating running total Kathy Running & Setting Up Queries 26 June 22nd, 2004 10:14 PM
Custom Error Messages DMc2004 Database Design 4 June 11th, 2004 11:16 PM


All times are GMT +1. The time now is 07:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.