coming back from report - form out of position

50ld13r

Registered User.
Local time
Today, 19:41
Joined
Jun 2, 2006
Messages
23
hi i have a button that loads a report. If i then close the report the form, which is set with no border/no max/min/close/non movable and opens maximised, places itself off centre. I want it to stay maximised full screen. The only work around i currently have is when the use moves the mouse over the form it maximises itself. Will this then be calling this function everytime the mouse moves(cant be very efficient). is there a better way to maximise the form Immediately after closing the report.
 
On the report close event, set focus on the form and maximize it.

Are you resizing your form for multiple monitor sizes?
 
Have you checked if the form's properties has AutoCenter=True and AutoResize=True?
 
sorry bit of a stupid question whats the syntax to refer to the form in the report on close command,

something like [myformname]!docmd.maximise()
 
On the form's OnClose event (property), the following is automatically built:

PHP:
Private Sub Form_Close()

End Sub

just add the following to that subroutine:

PHP:
Private Sub Form_Close()
forms![The name of form that's presumably open behind the report].SetFocus
docmd.maximize
End Sub

he form and report having focus is maximized by the foregoing. If the form isn't open, you have to open it for the foregoing code to work.

The autoresize property doesn't resize form controls.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom