ACC97: "Division by Zero" Error Using Publish To The Web WizardID: Q178886
|
Moderate: Requires basic macro, coding, and interoperability skills.
After you set the ScaleMode property in a report to 5 or to 7 and try to
publish the report as HTML by using the "Publish to the Web Wizard," the
wizard may fail, and you may receive the following error message:
Division by Zero.
This behavior occurs if the following conditions are true:
The ScaleMode property, in conjunction with the ScaleHeight, ScaleWidth,
ScaleLeft, and ScaleTop properties are generally used to create custom
coordinate systems for purposes of drawing or changing the size of objects
on a report or form.
If it is necessary to use inches or centimeters as a scale, you can do so
by setting the ScaleMode property to 1 (Twips), and then using the
following conversions to arrive at an equivalent setting in inches or
centimeters:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
' Set the ScaleMode property of the Details section to 5 (Inches)
Me.ScaleMode = 5
' Draw a circle in the Details section with a radius of .25
' Inches.
Circle (ScaleWidth / 2, ScaleHeight / 2), 0.25
End Sub
Private Sub PageFooter_Format(Cancel As Integer, FormatCount As _
Integer)
' Set the ScaleMode property of Page Footer section of the report
' to 1 (Twips)
Me.ScaleMode = 1
' Draw a circle in the Details section of the report with a
' radius 1 of .25 Inches by multiplying .25 by 1440 which will
' return the equivalent of .25 Inches
Circle (ScaleWidth / 2, ScaleHeight / 2), (0.25 * 1440)
End Sub
Private Sub Detail_Format(Cancel As Integer, FormatCount As _
Integer)
' Set the ScaleMode property of the Details section to 5 (Inches)
Me.ScaleMode = 5
End Sub
For more information about the ScaleMode property, search the Help Index for "ScaleMode Property," or ask the Microsoft Access 97 Office Assistant.
Additional query words: prb division error divide
Keywords : kberrmsg RptOthr WzProb
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: April 27, 1999