ACC2000: Incorrect PrtMip Example in HelpID: Q208331
|
When you use the PrtMip property example in Help, you may receive the following error message:
Compile Error:
Method or data member not found
The Help example contains errors in the name of the elements used in the subroutines for these procedures.
Use the following procedures in your module instead of the ones provided in the Help example:
Sub PrtMipCols(strName As String)
Dim PrtMipString As str_PRTMIP
Dim PM As type_PRTMIP
Dim rpt As Report
Const PM_HORIZONTALCOLS = 1953
Const PM_VERTICALCOLS = 1954
DoCmd.OpenReport strName, acDesign
Set rpt = Reports(strName)
PrtMipString.strRGB = rpt.PrtMip
LSet PM = PrtMipString
' Create two columns.
PM.cxColumns = 2
' Set 0.25 inch between rows.
PM.xRowSpacing = 0.25 * 1440
' Set 0.5 inch between columns.
PM.yColumnSpacing = 0.5 * 1440
PM.rItemLayout = PM_HORIZONTALCOLS
LSet PrtMipString = PM ' Update property.
rpt.PrtMip = PrtMipString.strRGB
End Sub
Sub SetMarginsToDefault(strName As String)
Dim PrtMipString As str_PRTMIP
Dim PM As type_PRTMIP
Dim rpt As Report
DoCmd.OpenReport strName, acDesign
Set rpt = Reports(strName)
PrtMipString.strRGB = rpt.PrtMip
LSet PM = PrtMipString
PM.xLeftMargin = 1 * 1440 ' Set margins.
PM.yTopMargin = 1 * 1440
PM.xRightMargin = 1 * 1440
PM.yBotMargin = 1 * 1440
LSet PrtMipString = PM ' Update property.
rpt.PrtMip = PrtMipString.strRGB
End Sub
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
PrtMipCols("Customer Labels")
Note that you receive the error message mentioned at the beginning of this article.Additional query words: pra
Keywords : kberrmsg kbdta DcmHlp
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 13, 1999