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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adjusting print settings in an MDE in Access 2000

Status
Not open for further replies.

omniaccess

Technical User
Feb 2, 2005
16
US
Many have received answers to print margin adjustment to simply go to the page setup, change the margin settings, select orientation, and then save the document. I need to be able to go further than this.

(1) My program will be a MDE, so redoing the print layout programmatically will not work.
(2) Access 2000 can reset the margins and orientation when a printer is changed, etc. I know that Access 2002 or 2003 handles printing better, but I want to program for the lowest common denominator.
(3) Not everyone that receives the project MDE will have all service packs loaded, so I wanted a way around the service pack issues.
(4) I want to include micro adjustments in the report setup so the end user can adjust (shift) the printing to line up with labels better.

May of the reports have margins such as 1/2" and 3/4" where they are punched to put in a binder. Many of the are layed out in landscape mode. Also, labels are fed into printers just a little bit different for each one. Even the same exact printer model can be slightly different from another of the same type. Hence the need to offer clients micro adjustments.

I have read some of the PrtMip, PrtDevMode, and PrtDevNames commands that can be used, but I have found very little on properly using them in code. And, I am not sure if they can be used if the project is an MDE. I have seen that these functions are read only in an MDE, so they most likely don't work.

If anyone has any insight on this issue, please let me know. I am nearing completion of my project, and this is one of the last areas I need to address.

Thank you in advance.

Thomas
 
Thomas,

It may be easier to just "move" the controls as needed. I believe this will work with an MDE, since you are shifting the position at runtime and no changes are being made to the form. Also the an entire subreport can be moved.


Code:
'Simple example
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)

  If FormatCount > 1 Then Exit Sub
    If Me.Page Mod 2 = 1 Then
    Me.Controls.Item("Word").Left = 1650
  Else
    Me.Controls.Item("Word").Left = 550
   End If
End Sub

It is possible for you to retrieve device information and the move the controls based on some formula you create.

I hope this get you one step closer.

[thumbsup2]




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top