drcab, you might also check out the VISIBLE property for forms - it's a very easy way to hide all but the currently focused form:
Sub MainForm_CLICK()
me.visible = true
Docmd.openform "MainFOrm"
end sub
Sub MainForm_Close()
Me.Visible = false
Forms!SwitchBoardMenu.Visible = True
End Sub
and so on..
Some applications run a quick function to OPEN, HIDDEN all their main navigational forms and then make them visible and invisible when necessary. It makes for snappy looking performance, because the forms become visible much quicker.
[red]
Public Sub OpenAllForms()
Dim dbs As Database, ctr As Container, doc As Document, frm As Form
Set dbs = CurrentDb
Set ctr = dbs.Containers!Forms
'open all forms
For Each doc In ctr.Documents
DoCmd.OpenForm doc.Name, , , , , acHidden
Next
Set dbs = Nothing
Set ctr = Nothing
End Sub
[/red]
Ex-JimAtTheFAA
78.5% of all statistics are made up on the spot.
Another free Access forum: