Q. Adding code to tile Windows horizontally

J

Jim Jones

Hi.

I'd like to be able to tile both form windows horizontally, when I
click on the button, which is on the first form.

The two forms that are displayed at the same time were created by the
form wizard, using a query that uses 3 tables. I think i like the
way the wizard split them up.

But, when I click on the button on the first form, the second one pops
up, and displays the proper record and everything, but the second
window is overlaid on top of the first or "calling" form as I call it.

OK, so here is the current code in the "onclick" event of the button
that pops up the second form.

Sub ToggleLink_Click()
On Error GoTo ToggleLink_Click_Err

If ChildFormIsOpen() Then
CloseChildForm
Else
OpenChildForm
FilterChildForm
End If

ToggleLink_Click_Exit:
Exit Sub

ToggleLink_Click_Err:
MsgBox Error$
Resume ToggleLink_Click_Exit

End Sub


OK, so how do I fit in the code that would tile the two forms
horizontally? I imagine it would go after the End If statement.

Please help,
Thanks,
Jim
 
J

James Goodman

Take a look at:
DoCmd.RunCommand acCmdTileHorizontally

This should do the same as selecting Tile Horizontally from the Window
menu...
 
J

Jim Jones

Take a look at:
DoCmd.RunCommand acCmdTileHorizontally

This should do the same as selecting Tile Horizontally from the Window
menu...

Janes,

That seems to do it. Yet, when I put the cursor on the
acCmdTileHorizontally statement and press F1, the help does come up
with a list of DoCmd.RunCommand Options but NOT that one !

Are there many other such options, not documented in help?

Also, there is a slight problem with this one, for which I'll find a
workaround, if there isn't a direct solution:

That is, it tiles the windows, but actually puts one on top of the
other, so when I use my record navigation buttons, it brings the one
form into focus, blocking the one one I want to see.

That's a minor problem right now.

Thanks for the tip,
Jim
 

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