Microsoft KB Archive/208331

= ACC2000: Incorrect PrtMip Example in Help =

Article ID: 208331

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q208331



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
When you use the PrtMip property example in Help, you may receive the following error message:

Compile Error:

Method or data member not found



CAUSE
The Help example contains errors in the name of the elements used in the subroutines for these procedures.



RESOLUTION
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



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
 Open the sample database Northwind.mdb. Press ALT+F11 to open the Visual Basic Editor. Click Microsoft Visual Basic Help on the Help menu, type PrtMip property in the Office Assistant or the Answer Wizard, and then click Search. Click Example at the top of the PrtMip Property Help screen. Highlight the declarations and the first procedure at the top of the example, and then press CTRL+C to copy the text to the clipboard.</li> Create a new module called PrtMipExample and press CTRL+V to paste the text into it.</li>  Type the following line in the Immediate window, and then press ENTER: PrtMipCols("Customer Labels") Note that you receive the error message mentioned at the beginning of this article. </li></ol>

Additional query words: pra

Keywords: kberrmsg kbbug kbpending KB208331

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.