print query in landscape

G

Guest

I have a button on my form that when clicked will use the 'PrintOut' macro
event to print a cross tab query that comes from a make table query.

Is there an extra bit of code I can run that will make the query print in
landscape instead of portrait?

Cheers!
 
G

Guest

This is only possible from vba.

You can set the orientation by using the following code:

currentdb.QueryDefs("Your Query Name").Properties("Orientation")=0 ' Portrait
currentdb.QueryDefs("Your Query Name").Properties("Orientation")=1 ' Landscape

However you can run this code from a macro then you just have to create a
module with 1 function

public Function SetLandscape(QueryName as string) as boolean
currentdb.QueryDefs(QueryName).Properties("Orientation")=1 ' Landscape
end function
 
G

Guest

i am using access 2000. i've tried what you suggests but it still won't work
the preview is still portrait.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top