Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Label loses format 1

Status
Not open for further replies.

AndreAraujo

Programmer
Feb 14, 2002
62
PT
HI, I´M HAVING A PROBLEM WITH A LABEL.
THIS LABEL IS FORMATED AND THE SPECIFIC PRINTER IS DEFINED,
IN WIN98 AND NT THE LABEL IS PRINTED CORRECTLY , BUT IN XP THE THE MARGINS ARE CHANGED.
THE PRINTER IS AN ELTRON, I TRIED TO FORMAT THE MARGINS WHEN I OPEN THE LABEL USING CODE,BUT WITH NO RESULTS.

ANY IDEAS?

THANKS IN ADVANCE, ANDRÉ

Private Sub cmdLabel_Click()
Call SetMargins("rptlabel", 0.5, 0.5, 0.5, 0.5)
DoCmd.Close acReport, "rptlabel", acSaveYes
DoCmd.OpenReport "rptlabel", acViewPreview
End Sub

Public Sub SetMargins(strName As String, sngLeft As Single, sngRight As Single, sngTop As Single, sngBottom As Single)
'-------------------------------
' strName = Report name
' sngLeft = Left Margin (in inches)
' sngRight = Right Margin
' sngTop = Top Margin
' sngBottom = Bottom Margin
'-------------------------------

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 = sngLeft * (1440 / 25.4)
PM.yTopMargin = sngTop * (1440 / 25.4)
PM.xRightMargin = sngRight * (1440 / 25.4)
PM.yBotMargin = sngBottom * (1440 / 25.4)
LSet PrtMipString = PM
rpt.PrtMip = PrtMipString.strRGB

End Sub
 
Problem solverd,

I had to Format the label in client computer.

 
I'll give you a star for solving it yourself since you can't do that. It's very gratifying to solve things on your own.

Jim DeGeorge [wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top