Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / October 2007

Tip: Looking for answers? Try searching our database.

Font gets hudge when rpt opens

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chad - 30 Oct 2007 04:49 GMT
Hello, When I click a button in my form to open my reports they are opening
in HUDGE font (like 80 font) sometimes and if I close the report and open it
a few times it opens regularly (regular size). How do I fix this?

Here is the code behind one of my buttons:

Private Sub Command32_Click()
On Error GoTo Err_Command32_Click

   Dim stDocName As String
   Dim stLinkCriteria As String

   stDocName = "rptViewContactRecord"
   DoCmd.OpenReport "rptViewContactRecord", acViewPreview, , "[ID] = " &
Me.ID

Exit_Command32_Click:
   Exit Sub

Err_Command32_Click:
   MsgBox Err.Description
   Resume Exit_Command32_Click
   
End Sub
Signature

Newbies need extra loven.........

Jerry Whittle - 30 Oct 2007 16:06 GMT
Is the font huge or the entire report? It could be zooming up to something
like 400%. Check events like On Open to see if there is any code that would
cause this to happen.

You could put the following two lines of code under your Docmd.OpenReport:

 DoCmd.MoveSize 1, 1, 14500, 9000
 DoCmd.RunCommand acCmdZoom100

MoveSize positions the report on the screen and acCmdZoom100 sets the zoom
level. Below are some other zoom levels.

acCmdZoom10
acCmdZoom1000
acCmdZoom150
acCmdZoom200
acCmdZoom25
acCmdZoom50
acCmdZoom500
acCmdZoom75
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> Hello, When I click a button in my form to open my reports they are opening
> in HUDGE font (like 80 font) sometimes and if I close the report and open it
[quoted text clipped - 20 lines]
>    
> End Sub
Chad - 30 Oct 2007 16:46 GMT
Jerry, The only thing I have for VBA for the reports are DoCmd.Maximize so it
shows full screen. I added the two lines of code in the OnOpen event of the
report and its giving me an Run time error 2046 "The command zoom 100% isnt
avabale now. here is the code in my OnOpen event for the report. Thnaks!

Private Sub Report_Open(Cancel As Integer)
DoCmd.Maximize
DoCmd.MoveSize 1, 1, 14500, 9000
DoCmd.RunCommand acCmdZoom100
End Sub
Signature

Newbies need extra loven.........

> Hello, When I click a button in my form to open my reports they are opening
> in HUDGE font (like 80 font) sometimes and if I close the report and open it
[quoted text clipped - 20 lines]
>    
> End Sub
Jerry Whittle - 30 Oct 2007 18:59 GMT
My mistake on the code. It needs to go in a module and not the code behind
the report or form. Something like:

Sub sOpenRptViewContactRecord()
 DoCmd.OpenReport "rptViewContactRecord", acViewPreview
 DoCmd.MoveSize 1, 1, 14500, 9000
 DoCmd.RunCommand acCmdZoom100
End Sub

Then the code behind the button would simply be:
 sOpenRptViewContactRecord()
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> Jerry, The only thing I have for VBA for the reports are DoCmd.Maximize so it
> shows full screen. I added the two lines of code in the OnOpen event of the
[quoted text clipped - 31 lines]
> >    
> > End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.