-
Prreview Fit
I'm converting an Access 97 database to a later version, and for the most part it has been successful, but I have one abnormality that I can't seem to find any information on.<br>
<br>
When the DB generated reports in the Access 97 version, it automatically scaled the report to 100%. After I did the conversion it always scales the report to 'fit' the window. I did find a command to insert in the code to correct this:<br>
<br>
DoCmd.RunCommand acCmdZoom100 (that's off the top of my head...the syntax may be wrong)<br>
<br>
...which works, but I have to do that for every instance of 'OpenReport' in the code. Under the Access 97 version it was automatic. Every issuance of 'OpenReport' had an 'A_PREVIEW' option and I thought that might be related somehow to the fit, but I can't find a single thing on this 'A_PREVIEW' option, which I thought might answer my question.<br>
<br>
Is there a global setting or something else that I've missed that would make that 100% preview a default?<br>
<br>
Thanks.
-
You shouldnt have to use a zoom if the report is formated for the page.
docmd.openreport "rptName", acViewPreview
is all it needs.
-
'Formatted for the page'...I'm afraid I don't quite know what that means. I'm by no means an expert Access coder, just the guy who knows the most about it in the circle of people that have to deal with this antique DB.
The reports are formatted for an 8.5 x 11 sheet of paper in landscape orientation, which print out just fine, but the issue is preview differences in Access 97 and 2003.
All I know is that in the past the report would open at 100% size, although the top of the preview has a drop down list that would allow the user to change the size. Under Access 2003 that default size is know 'fit', which puts the whole report in the window. This is too small for the user to see, so they have to resize it to 100%, which is certainly not difficult, but it is an inconvenience for them.
The syntax of the code is DoCmd.OpenReport "InvoiceItems" (or other report name), A_PREVIEW
I thought there might be some options for A_PREVIEW which would let me dictate size, but I can't find info on A_PREVIEW anywhere on the web. I might not using the right search syntax, though.
-
If that option works, Open Form in Design, View Code, Use Replace All button to replace Do.Cmd.RunCommand XXX with DoCmd.RunCommand acCmdZoom100? You just have to do this 1 time for all the reports right?
-
No, I would have to do it for every report since they're all opened through VBA code and there's quite a few reports. I will go that route if I can't get an answer to my original question.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules