Window sizing

C

ctdak

My Access/VBA application is developed and compiled in Access 2000 and it has
always run on PCs with Access 2000 until recently. It is now running on 2
PCs with Access 2002 and an interesting phenomenon is occuring. The report
window that opens when a report is generated is very small on the 2002 PCs,
whereas the same version of the app in 2000 opens a much larger window for
the same reports. This is more annoying than anything, but does anyone know
why this is happening?

What determines the size of a report window when it first opens, and why
would that be different under two different versions of Access?
 
J

Jerry Whittle

I'm not sure why, but you can work around it. Create a function like below
and call it in the On Open event of the report. The first two 1's will start
the report at the upper left corner. The next two numbers are the width and
heights of the report window in twips. You may need to play around with these
numbers to get it right for your database.

Fancy menu bars and a few other things can mess it up slightly. Also
different screen resolutions will give different results.

Public Function fMoveSize()

DoCmd.MoveSize 1, 1, 14500, 9000

End Function
 
D

david

I don't have Access installed at all today. This is from memory, and
doesn't answer the question, but may help the irritation, or may only
be relevant for a much older version of Access.

Open the report in Design View. By default, the size of the window you
get in design view is the size of the window you get in report preview.

Resize the design view window, then save the report.

(david)
 
C

ctdak

David,

It's true that saving the report window in design view sets the size/shape
of it, but that size/shape is NOT maintained when set in Access 2000 and then
run in Access 2002/2003. That's the "problem" I was reporting. The
size/shape changes drastically when generating the report in 2002/2003.

ctdak
 
C

ctdak

Jerry,

I have now implemented this "fix" throughout my application, using a global
procedure as you suggested. However, here's what I have discovered. When
running this app in Access 2000, the report preview window position and size
are both exactly as coded. When running this app in Acess 2002/2003,
however, the window positioning is as coded, but the window size code values
(width and height) are completely ignored!!!

I am compiling in VBA/Access 2000. Any further ideas on why this would be
happening?

ctdak
 

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