PDA

View Full Version : Reports: set it to print in ctr of page (like the "Center on Page" option in Excel)?



Gingertrees
08-01-2008, 07:08 AM
Rather than spend extra time dragging and resizing page borders, is there a VBA command to get a report to print in the center of a page? Excel has this function for its spreadsheets...

Am I getting close with this code? :

Option Compare Database
Option Explicit
Sub_Align
'align the Pharmacy Referral report in the center of the page
DoCmd.AcCommand.acAlignCenter (rptPharmacyReferral)
End Sub

Carl A
08-02-2008, 01:51 PM
I have never used it but try:

Report.AutoCenter = True

Gingertrees
08-04-2008, 10:03 AM
Was there supposed to be other code around it? Here is what I typed (and it did nothing) :

Option Compare Database
Option Explicit

Report.rptMedicalRelease (AutoCenter = True)

Other ideas? SOMEBODY must have done something with this...
~Gingertrees

Mavyak
08-04-2008, 10:43 AM
I think the syntax might be a little off. You usually only need parentheses when storing the result of a function. Since you are only interested in the action, try the following:

Report.rptMedicalRelease AutoCenter:=True

Gingertrees
08-05-2008, 10:01 AM
Nope, that didn't help either. Looks like I'm just going to be stuck with lots of dragging and dropping and checking.