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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

# Error



 
 
Thread Tools Display Modes
  #1  
Old October 17th, 2005, 05:58 PM
needing help please
external usenet poster
 
Posts: n/a
Default # Error

Hi there,

I cannot find the post on converting # error to zero.

In a query, my field is:

% staff processed: (nz([staff],0))/(nz([client],0))

if the client value is zero, the returned value is # error.

Is there a way to make it show either 0 or n/a?

thanks
  #2  
Old October 17th, 2005, 06:16 PM
George Nicholson
external usenet poster
 
Posts: n/a
Default # Error

% staff processed: iif(nz([client],0) =0, 0, nz([staff],0) / nz([client],0))

--
George Nicholson

Remove 'Junk' from return address.


"needing help please" wrote in
message ...
Hi there,

I cannot find the post on converting # error to zero.

In a query, my field is:

% staff processed: (nz([staff],0))/(nz([client],0))

if the client value is zero, the returned value is # error.

Is there a way to make it show either 0 or n/a?

thanks



  #3  
Old October 17th, 2005, 06:29 PM
John Spencer
external usenet poster
 
Posts: n/a
Default # Error

You need to test for Zero or null and handle that. Something like the
following.

% staff processed: IIF(NZ(Client,0)=0, 0,NZ(Staff,0)/Client))


"needing help please" wrote in
message ...
Hi there,

I cannot find the post on converting # error to zero.

In a query, my field is:

% staff processed: (nz([staff],0))/(nz([client],0))

if the client value is zero, the returned value is # error.

Is there a way to make it show either 0 or n/a?

thanks



 




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
Reserved Error - 1104 - Works in 97 not in XP? beveritt General Discussion 0 August 25th, 2005 05:07 PM
Error message different in MDB and MDE david epsom dot com dot au General Discussion 1 September 21st, 2004 12:47 AM
Continual Error 1321 Trying to Install Office 2003 Chad Harris General Discussions 9 June 11th, 2004 08:19 AM
Product Key for Office XP P.G.Indiana Setup, Installing & Configuration 1 June 7th, 2004 03:22 AM
Error #1321 MOS 2003 Setup Chad Harris Setup, Installing & Configuration 1 June 7th, 2004 12:22 AM


All times are GMT +1. The time now is 07:29 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.