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

#Num! Error



 
 
Thread Tools Display Modes
  #1  
Old September 1st, 2004, 05:49 PM
Crown Royal
external usenet poster
 
Posts: n/a
Default #Num! Error

I have a report in which one part calculates the results from one field
divided by another. When there is a number in the divisor, everthing is fine,
but when the divisor is zero (the dividend is always zero at that point as
well), I get the Num error. The control source for this control is:
=DSum("[TransientRackRate]","[qryRoomsDaily]")/[RackTodayAnalysis]
I have tried to add an Iff to it, but I guess "And" is not what I need. Thx
for any help

Eric
  #2  
Old September 1st, 2004, 06:02 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default

Use IIf() to test for zero in the divisor:
=IIf([RackTodayAnalysis] = 0, 0,
DSum("[TransientRackRate]","[qryRoomsDaily]")/[RackTodayAnalysis])

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

"Crown Royal" wrote in message
...
I have a report in which one part calculates the results from one field
divided by another. When there is a number in the divisor, everthing is
fine,
but when the divisor is zero (the dividend is always zero at that point as
well), I get the Num error. The control source for this control is:
=DSum("[TransientRackRate]","[qryRoomsDaily]")/[RackTodayAnalysis]
I have tried to add an Iff to it, but I guess "And" is not what I need.
Thx
for any help

Eric



 




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
Error 3270 Property not found Nelson Setting Up & Running Reports 9 August 2nd, 2004 11:53 PM
Reserved Error 1517 SJH General Discussion 6 July 13th, 2004 07:25 PM
problems initiating mplay32.exe electricrainbowfish Powerpoint 8 July 8th, 2004 09:37 AM
error 3011-msaccess Lalit H Kokku New Users 1 July 6th, 2004 03:34 AM
sending error -- anyone up to challenge? Roxy Outlook Express 18 June 30th, 2004 11:01 PM


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