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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#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
|
|||
|
|||
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 | |
|
|
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 |