Form Position when Opened

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
 
P

PC Datasheet

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.
 

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