ernmeister
Sep 13th, 2000, 01:06 PM
I copied the following program straight from the help file in Access. According to the commentary, it should set all the report margins to 1". However, when I run the program, the Top margin gets set to .166", the Left margin gets set to .250" and the Right and Bottom margin remain unchanged.
Any clues as to why this happens?
Thanks,
ern
Dim PrtMipString As str_PRTMIP
Dim PM As type_PRTMIP
Dim rpt As Report
DoCmd.OpenReport "test2", acDesign
Set rpt = Reports("test2")
PrtMipString.strRGB = rpt.PrtMip
LSet PM = PrtMipString
PM.intLeftMargin = 1 * 1440 ' Set margins.
PM.intTopMargin = 1 * 1440
PM.intRightMargin = 1 * 1440
PM.intBotMargin = 1 * 1440
LSet PrtMipString = PM ' Update property.
rpt.PrtMip = PrtMipString.strRGB
Any clues as to why this happens?
Thanks,
ern
Dim PrtMipString As str_PRTMIP
Dim PM As type_PRTMIP
Dim rpt As Report
DoCmd.OpenReport "test2", acDesign
Set rpt = Reports("test2")
PrtMipString.strRGB = rpt.PrtMip
LSet PM = PrtMipString
PM.intLeftMargin = 1 * 1440 ' Set margins.
PM.intTopMargin = 1 * 1440
PM.intRightMargin = 1 * 1440
PM.intBotMargin = 1 * 1440
LSet PrtMipString = PM ' Update property.
rpt.PrtMip = PrtMipString.strRGB