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

Access XP Landscape Report 2

Status
Not open for further replies.

jmeadows7

IS-IT--Management
Jun 13, 2001
148
US
I have a report in Access XP that is set to be landscape. The first time the report displays for a user, it comes up in portrait. Close the report and re-open it, and it looks fine.

Any ideas on how to make the landscape format stick for the first time open?

Thanks,
 
I've never heard of this before, but how are you opening the report? Is it possible that you've got code that is setting the orientation to landscape? You may also have a preference set up somewhere in the WinXP OS (outside of MS Access) that forces pages to landscape?

Either of these two a possiblilty?

-Patrick

Nine times out of ten, the simplest solution is the best one.
 
I am experiencing the same problem, did you find a solution to this?
 
Unfortunately no. I'll post back if anything turns up though.
 
I had this problem with reports that I want in landscape and they would get messed up by the users. So instead I set the default printer's orientation to landscape each time a report is opened. Put this in on a open event as VBA code.

Application.Printer.Orientation = acPRORLandscape
 
CJSOREL - Thanks - worked like a charm - I thought I had tried that, but obviously I had not - so thanks and a start to u!
 
Jmeadows7 - your welcome and thanks for the star.
 
Hi there,

I have had problems with printing a landscape report at the client's site. The report page set up has orientation set to landscape and using default printer.

On my computer (Access XP with SP2) and using default printer (HP LaserJet 8000 Series PCL) I preview and print out landscape - just as I expected.

My client has 3 computers -2 running Access XP and the third Office 2003. I cannot get any of these computers to consistently preview and print this report with landscape orientation. My client uses default printer (HP LaserJet 2500 PCL 6) for 2 of the computers and (HP LaserJet 2200 PCL 6) for the third computer.

I have tried vba code in the event procedure for the on open event:
Code:
Application.Printer.Orientation = acPRORLandscape
and I've also tried
Code:
Me.PrtDevMode(44) = 2
unfortunately neither seem to work.

When the user goes into Page setup and selects a specifc printer ( the non default one) the reports seem to print landscape reports!!!!

Also, when I go into Tool..Options ... General I cannot see the Name AutoCorrect boxes - do I need to set something to view these boxes?? Some threads have mentioned that unchecking these boxes will solve the problem in Access 2000. I'm not running Access 2000 anyway.


Does anyone have any ideas!!!

Cheers
Stable
 
I found two solutions to this problem:

1: Go to Tools/Options/General, Uncheck "Track Name Autocorrect Info" located on the left side at about the middle (I also use Acess XP SP2)

OR
2: Have a program run at startup which changes the orientation on a blank report and then closes it down. I fount that if you do this once you do not see a problem with the orientation again.

Public Function OrientCorrect()

On Error GoTo ErrHandler

DoCmd.OpenReport "rptSetOrientation", acViewDesign
DoCmd.RunCommand acCmdSelectReport
DoCmd.RunCommand acCmdWindowHide
Reports("rptSetOrientation").Printer.Orientation = acPRORLandscape
DoCmd.OpenReport "rptSetOrientation", acViewPreview
DoCmd.Close acReport, "rptSetOrientation", acSaveNo

ExitHere:
Exit Function
ErrHandler:
Resume ExitHere

End Function

Create a blank report named "rptSetOrientation". The report will flash quickly at startup but will immediately go to hidden mode to keep it transparent from the user.

Hope it helps,
DP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top