Open Report generates a tiny window? (1 Viewer)

Avoraightu

New member
Local time
Today, 06:37
Joined
Mar 5, 2020
Messages
28
Recently my reports have started opening as very small windows.
I haven't been able to determine why.

The VBA code:

DoCmd.OpenReport "rptPrintFATDataS8500", acViewPreview, , "[SystemNumber] Like '" & strSystem & "'"

I tried adding ",acWindowNormal" to the end but it does not seem to make a difference

Other users are experiencing the same thing, has anybody else experienced this?

Screenshot 2021-04-12 111132.png
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:37
Joined
Aug 30, 2003
Messages
36,124
I think it opens to the size it was last closed, but you can add this after the OpenReport line:

DoCmd.Maximize
 

Avoraightu

New member
Local time
Today, 06:37
Joined
Mar 5, 2020
Messages
28
It doesn't seem to matter what size they are when they are closed, they still open tiny.
It also seems to only affect reports opened via command button, if you double click the report directly it opens normally.

This just started doing this recently could it be related to any Office 365 updates?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 05:37
Joined
Aug 30, 2003
Messages
36,124
I'm not sure, my production development is done in an earlier version. Also I think I always have that maximize code anyway.
 

Avoraightu

New member
Local time
Today, 06:37
Joined
Mar 5, 2020
Messages
28
The only issue that I have with "Maximize" is that it opens the window to the size of my screen, not the size of the report. Is there a simple way to get the window to match the page size?
 

isladogs

MVP / VIP
Local time
Today, 13:37
Joined
Jan 14, 2017
Messages
18,211
Try this
Code:
Private Sub Report_Open()
    DoCmd.RunCommand acCmdFitToWindow
End Sub

Or you can use something like this
Code:
   DoCmd.RunCommand acCmdZoom100

There are many other possibilities to choose from
 

Avoraightu

New member
Local time
Today, 06:37
Joined
Mar 5, 2020
Messages
28
Thanks Colin, I realized later that it was probably because I was messing with the size of the main window. Some users were experiencing reports opening minimized to the task bar.

What I ended up doing was changing the Report settings to: Auto Resize No

It works but you have to change every report in your application :(

I think we can consider this issue solved, I will experiment with your suggestions on future reports.

Thank You for the support (y)
 

Users who are viewing this thread

Top Bottom