The ever increasing form...

  • Thread starter Thread starter Louie Warren
  • Start date Start date
L

Louie Warren

I am new to VB... I inherited the following bit of code
in a database I am trying to work with; I was told it
autosizes the form on Open:

Private Sub Form_Open(Cancel As Integer)

Dim rctOriginal As adhTypeRect
Call adhScaleForm(Me, 800, 553, 96, 96, rctOriginal)

DoCmd.Maximize
DoCmd.GoToRecord , , acLast
DoCmd.GoToRecord , , acFirst

End Sub

After modifying the form to reflect the change from an
Access backend to an Oracle backend, every time I would go
back to form mode, the form would increase... I guess by a
font size. This happened slowly and eventually, it was
huge (24 or so)! The problem is, it never returns
to "normal size". I commented out everything in the code
except the 1st line, the end, and the DoCmd.Maximize. Now
the detail area is blank/gray in datasheet/form mode. The
fields are there in design mode.

What have I done and how can I fix it? Thanx!

L
 
I use this function too:
Call adhScaleForm(Me, 800, 553, 96, 96, rctOriginal)

The trick is to NEVER open the form in design mode UNLESS your screen
resolution is also set to 800 x 600.
(800 x 553 in the code is close enough).

I bet your monitor is 1024 x 768 (or higher) so you get the ever incressing
form problem.
I always have backup copies available and I restore "original" forms when I
forget and accidentally save a form at the wrong resolution.

Not sure if you can open it on a screen that is 800 x 600 and fix it. It may
be too far gone.
 
Why not change the parameters in the call to 1024 and
768? Why can't it dynamically change depending on the
resolution? I'm new at this, so I don't know if that's a
stupid question or not.

L

-----Original Message-----
I use this function too:
Call adhScaleForm(Me, 800, 553, 96, 96, rctOriginal)

The trick is to NEVER open the form in design mode UNLESS your screen
resolution is also set to 800 x 600.
(800 x 553 in the code is close enough).

I bet your monitor is 1024 x 768 (or higher) so you get the ever incressing
form problem.
I always have backup copies available and I
restore "original" forms when I
 
You probably could change them.
However, each time you design the form the screen should be at the same res
as the params.

Note: experience shows that 800 x 600 is the best design res for going
higher and lower.
If you design at 1024 then the screen may look pretty bad at 640.
If you design at 800 the screen looks good at 640, 800 and 1024.
 
Back
Top