I am a little confused by your reply as to which form is which. Maybe you could
restate your solution using my real form names. In my app, when Access opens,
the form [Master Menu] automatically appears maximized. A command button on
{Master Menu] calls, by macro (NOT VBA), the form [Volunteers], which is
displayed windowed, and [Master Menu] remains in background.
It just seems to me that VBA should be able to focus a form by tracing the
correct path, i.e. Forms![formname]....
Thanks for your help

Signature
All the Best . . .
Richard Harison
> Richard,
>
[quoted text clipped - 38 lines]
> > All the Best . . .
> > Richard Harison
lwells - 26 Oct 2005 22:03 GMT
Richard,
You have just seen one of the limitations by using a macro. Why not try to
code using VBA in your events with the example supplied.
On your [Master Menu] using the button that opens the form [Volunteers]
place this code in the On Click event. You will need to open the VBA editor
to paste this code in. Click on the elipse the three dots to the right (...)
once you place your cursor in the On Click field. Select Code Builder and
paste the code between the blue Private Sub and End Sub blocks. Normally the
cursor will already be there to paste the code below.
DoCmd.OpenForm "Volunteers", , , , , , Me.Form.Name
In the Open Event of your [Volunteers] form paste this code (VBA Editor
window)
If Not IsNull(Me.OpenArgs) Then
DoCmd.SelectObject acForm, Me.OpenArgs
DoCmd.RunCommand acCmdWindowHide
End If
Then in the Close Event of [Volunteers] form paste this code (VBA Editor
window)
If Not IsNull(Me.OpenArgs) Then
DoCmd.OpenForm Me.OpenArgs
End If
This will accomplish what you are after without using a macro.
> I am a little confused by your reply as to which form is which. Maybe you could
> restate your solution using my real form names. In my app, when Access opens,
[quoted text clipped - 48 lines]
> > > All the Best . . .
> > > Richard Harison
Richard Harison - 26 Oct 2005 22:43 GMT
LIKE A CHARM!
Many, Many Thanks
(Any thoughts on how to ditch the Database Window as well?)
(Amen! on limits of macros!!)

Signature
All the Best . . .
Richard Harison
> Richard,
>
[quoted text clipped - 79 lines]
> > > > All the Best . . .
> > > > Richard Harison
lwells - 26 Oct 2005 23:28 GMT
Sure,
Go To Tools/StartUp and uncheck Display Database Window
Cheers
> LIKE A CHARM!
> Many, Many Thanks
[quoted text clipped - 94 lines]
> > > > > All the Best . . .
> > > > > Richard Harison
Richard Harison - 27 Oct 2005 01:02 GMT
Yeah...I knew that...I meant "on the fly" as it were...making it
visible/invisible with the wave of a hand! Thanks

Signature
All the Best . . .
Richard Harison
> Sure,
> Go To Tools/StartUp and uncheck Display Database Window
[quoted text clipped - 99 lines]
> > > > > > All the Best . . .
> > > > > > Richard Harison
lwells - 27 Oct 2005 14:35 GMT
Just for fun,
Create a command button on a form and give it the name cmdHide and the
caption of Hide DB. In the On Click event paste this code:
Private Sub cmdHide_Click()
If Me.cmdHide.Caption = "Hide DB" Then
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide
Me.cmdHide.Caption = "UnHide DB"
ElseIf Me.cmdHide.Caption = "UnHide DB" Then
DoCmd.SelectObject acTable, , True
Me.cmdHide.Caption = "Hide DB"
Me.SetFocus
End If
End Sub
Now you can toggle showing or hiding the database window. You can probably
adapt the code anywhere you want pretty easily.
Cheers
> Yeah...I knew that...I meant "on the fly" as it were...making it
> visible/invisible with the wave of a hand! Thanks
[quoted text clipped - 114 lines]
> > > > > > > All the Best . . .
> > > > > > > Richard Harison
Richard Harison - 27 Oct 2005 20:14 GMT
It was fun! I loved the way you used changing the caption not only to show
which state the button was in but which logic to trigger. Clever!
My visuals look a lot better now, and since the database is for a social service
organization, it was in a good cause! Thanks again!!

Signature
All the Best . . .
Richard Harison
> Just for fun,
>
[quoted text clipped - 17 lines]
>
> Cheers
~~~snip