Change Report to open 100%

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Report opens to fit can I change the option to open at 100% View???

Thanks in advance.........Bob Vance
 
Bob,
The code to zoom the report has to go with the OpenReport method.
DoCmd.OpenReport "YourReport", acViewPreview
DoCmd.RunCommand acCmdZoom100
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
There are 10 types of people in the world.
Those who understand binary, and those who don't.
 
Bob,
The code I posted is placed in the form module of the form that calls the report. It
doesn't go anywhere in the report itself.

Ex. a form called frmMenu... with a button called cmdOpenReport...
In the module of that form, against the button Click event...

Private Sub cmdOpenReport_Click()
DoCmd.OpenReport "YourReport", acViewPreview
DoCmd.RunCommand acCmdZoom100
End Sub
 
Al, The form is called frmInvoice and the button on it is to open
rptViewExpenses.....Just not sure how to get to Module!
Thanks Bob
 
GOT IT Thanks for your help AL :)

Private Sub View_All_Expenses_Click()
On Error GoTo Err_View_All_Expenses_Click

Dim stDocName As String

stDocName = "rptViewExpenses"
DoCmd.OpenReport stDocName, acViewPreview
DoCmd.OpenReport "rptViewExpenses", acViewPreview
DoCmd.RunCommand acCmdZoom100
Exit_View_All_Expenses_Click:
Exit Sub


Err_View_All_Expenses_Click:
MsgBox Err.Description
Resume Exit_View_All_Expenses_Click

End Sub
 
Good deal Bob.

Code looks OK... just one point...
DoCmd.OpenReport stDocName, acViewPreview
DoCmd.OpenReport "rptViewExpenses", acViewPreview

The second line is not needed, it's just a repeat of the first line, but using the real
name of the report rather than stDocName.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
There are 10 types of people in the world.
Those who understand binary, and those who don't.
 
AL it seems to open up out of alignment you can only see the bottom right
hand corner when it first opens at 100%...Thanks Bob
 
Bob,
Couldn't reproduce your problem, no matter what I tried.
Nor have I ever heard of this odd behavior in regards to opening a report at any Zoom
factor.

Does this happen with all your reports? Try some others.
Is this 8 1/2 by 11, portrait?

All I can offer is....
Drop the error code from the OpenReport coding, just for now... just use...
DoCmd.OpenReport "rptViewExpenses", acViewPreview
DoCmd.RunCommand acCmdZoom100

Make a copy of the report (rename it). Test that usinmg the same "open" code above.
Remove all your code from that copy of the report and test.
Create a new form with just some labels on it, and test that
Also, can't hurt to Compact and Repair...

Otherwise try a brand new post with that question (include your Access version no),
but... like I say, I couldn't find anything on that bug in the google groups, nor could I
duplicate it.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
There are 10 types of people in the world.
Those who understand binary, and those who don't.
 
It seem to be working ok, then I changed the font from 8 to 10 and it
starting doing the same thing so I deleted that copy db went to original and
it started show the bottom right corner on all my 100% codes I had
entered...Thanks Bob
 
Ah Ha, When I open Report Design and close out it comes up showing bottom
right Corner but when I close the programme completely and re open it, it
corrects its self Hmmmm......Access 2002, thanks for your help,,,Bob
 
Yes... Hmmmm is right!
I tried everything in 97... and I really didn't think Preview/Zoom would be any diffrerent
in any other version.
But, I rarely use 2002... like Acess95 it seems to be the "lost" version.
--
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
There are 10 types of people in the world.
Those who understand binary, and those who don't.
 

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

Similar Threads


Back
Top