Silly Print Preview Question

K

Kimberly3626

I don't know why, but some of my reports look VERY different when in Report
View vs Print Preview mode. I had to use minimized subreports to make the
printable versions work, and some of them are almost blank in the report view.

My solution, and my overall goal, is to have all reports in my database open
in Print Preview, regardless of what machine the DB is run on.

What snippet of code do I need to make that happen via switchboard? Or,
what settings for the DB can I change to make that happen? If it's code,
where shall I put that code to make it work/apply to all reports?

Thanks in advance for the support!
Kim
 
K

Kimberly3626

Ok. So it's not a Monday, but it sure feels like it!
I think I got it to work by modifying the default view of the report in the
Properties box.
Sorry for any inconvenience!
 
K

Kimberly3626

I was wrong. While it forces them to open in print preview when I double
click manually, it is still opening the 'report view' from the main
switchboard.

Should I just nix the switchboard and make my own forms? Even then...how to
fix the problem?
 
G

golfinray

You should nix the switchboard because it is easier to create your own form
and use command buttons to launch. Code your command button OnClick event:
Docmd.openreport "yourreportname",,, acpreview
It will tell you the number of commas to add before you put the acpreview
command.
 
M

Marshall Barton

Kimberly3626 said:
I was wrong. While it forces them to open in print preview when I double
click manually, it is still opening the 'report view' from the main
switchboard.

Should I just nix the switchboard and make my own forms? Even then...how to
fix the problem?


You could eventually figure out how to fudge the switchboard
to open the reports correctly, but it's probably more
trouble than it's worth. Most(?) experienced developers
create their own form where they don't have some wizard
getting in the way.

The important point here is to have a button to open the
report using code in the button's Click event procedure.
The code could look something like:

Dim stDoc As String
Dim stCriteria As String
stDoc = "name of the report"
DoCmd.OpenReport stDoc, acViewPreview

The stCriteria variable will probably be used in the future
when you decide to filter the report to less than an entire
table or to filter the report without using clumsy query
parameter prompts.
 

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