dbTalk Databases Forums  

Divide by zero

comp.databases.ms-access comp.databases.ms-access


Discuss Divide by zero in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
zufie
 
Posts: n/a

Default Divide by zero - 10-16-2008 , 01:09 PM






Help!

How do I divide by zero on my form (in a text box).

That is, how do I carry out a division problem when the denominator is
zero?

Thanks!,

John


Reply With Quote
  #2  
Old   
ARC
 
Posts: n/a

Default Re: Divide by zero - 10-16-2008 , 01:18 PM






You need to check to see if the denominator is zero, as you can't divide by
zero otherwise an overflow error will result. You can use an IIF statement,
something like:

=IIf([denominator_field] = 0, 0, [numerator_field]/[denominator_field])

Hope this helps,


"zufie" <john.marruffo (AT) illinois (DOT) gov> wrote

Quote:
Help!

How do I divide by zero on my form (in a text box).

That is, how do I carry out a division problem when the denominator is
zero?

Thanks!,

John



Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.