Form Position when Opened

  • Thread starter Thread starter Bernie
  • Start date Start date
B

Bernie

Is there a way to offset the position of a new form that
is opened from one that had the focus?

For example:
Form A is open and has focus. User clicks command button
to open Form B.

Form B opens and has focus, but is offset from A.

Just a "nice to have" feedback from users. The forms are
similar in size so Form A looks hidden.

Bernie
 
Bernie,

There's a much better way to do this ---

Look at the standard modules in Northwind; there's an IsLoaded function there
that returns True if a form is loaded and False if it is not.

Put this code in the OnClick event of your button:

Me.Visible = False
DoCmd.OpenForm "B",,,,,acDialog
If IsLoaded("FormB") Then
DoCmd.Close acForm, "FormB"
End If
Me.Visible = True

You make FormA not visible when you open FormB and then make FormA visible again
when you close FormB.
 
Back
Top