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

Page Margins in Access

Status
Not open for further replies.

osi2301

Programmer
Jul 3, 2004
75
AU
I have developed a report in Access. This report is designed as a label. The label to be printed on a dot matrix printer with continuous form labels.

The problem: I can't adjust the page margins in Page Setup. I want to change the top and side margins to "0" but it defaults to 15.8mm from the top and 6.35mm from the left.

Is there anyway to override these defaults?
 
osi2301
What margin settings you can set will depend upon the minimum margin setting your dot matrix printer will allow.

Tom
 
I have three printers (one laser, one inkjet and one dot matrix). It doesn't matter what printer I use, the 'page setup' WITHIN Access for that report will not allow me to decrease the margins.

I can setup a page within Word and decrease the margins in page setup and the dot matrix will print correctly but not in Access.
 
Look up PrtMip in VBA help. There is an example for setting margins. One caveat of PrtMip, is that it is read only unless the report is in Design mode.

The Help example does open the report in Design mode to make the changes, however it isn't the sort of thing you will want to exhibit to a user. So set the report's visible property to False beforehand. After setting the margins and closing PrtMip, reset the visible property to True and then Print or Preview the report.

Cheers,
Bill
 
Sorry, but my suggestion sounded good at the moment. Unfortunately I tried it afterwards in an A2K application running on A2003 and also found that 0 margins weren't obtainable.

However, the minimum margins I reached (top and left) were 0.166 inches (or about 4.2 mm).

So is Access making a dll call to the default printer for the minimum margins as THWatson earlier suggested? If thats the case, then perhaps try switching your default printer and see what happens.

Cheers, Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top