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
|
|||
|
|||
Corrected divide by zero errors, now no formatting of numbers
I used the info in this help article:
http://office.microsoft.com/en-us/ac...CL100570041033 to correct divide by zero errors, and now the properties dialog box for that field does not allow me to set the decimal places at all. Is there a work around? Thanks. |
#2
|
|||
|
|||
Corrected divide by zero errors, now no formatting of numbers
"kahaymon" wrote in message
... I used the info in this help article: http://office.microsoft.com/en-us/ac...CL100570041033 to correct divide by zero errors, and now the properties dialog box for that field does not allow me to set the decimal places at all. That article gives really bad advice, that will create the problem you experienced. Step 4 of the last section suggests setting the Control Source ot: =IIf([Divisor]=0,"",[Dividend]/[Divisor]) It should be: =IIf([Divisor]=0, Null, [Dividend]/[Divisor]) The zero-length-string option means that Access treats the results as text, i.e. non-numeric. That's why you could not apply a numeric format. Technically, division by zero is 'undefined', which is perfectly represented as Null. (As a practial example, any averaging of the resultset will be correct if you use Null, because the undefined result should now skew the average.) I will attempt to get the article changed for you. -- 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. |
Thread Tools | |
Display Modes | |
|
|