T
tihelles
I have a frmStartupHidden as Startup form, which is supposed to
open hidden, open a recordset, and then open the Switchboard form and
give it focus/maximized. Code is as follows:
Private Sub Form_Close()
rstAlwaysOpen.Close
Set rstAlwaysOpen = Nothing
End Sub
Private Sub Form_GotFocus()
DoCmd.Restore
Me.Visible = False
End Sub
Private Sub Form_Open(Cancel As Integer)
Set rstAlwaysOpen = CurrentDb.OpenRecordset("tblDummy",
dbOpenSnapshot)
DoCmd.OpenForm ("Switchboard")
End Sub
------
The Switchboard amongst other has the code:
Private Sub Form_Activate()
DoCmd.Maximize
End Sub
------
My current code works, but my forms pop up and down a couple of times
before settling, I guess there must be a better/simpler way to open a form
hidden?
(I am using Acc97, but assume no relevant version changes on this?)
Thor Ivar Hellesoy, Norway
open hidden, open a recordset, and then open the Switchboard form and
give it focus/maximized. Code is as follows:
Private Sub Form_Close()
rstAlwaysOpen.Close
Set rstAlwaysOpen = Nothing
End Sub
Private Sub Form_GotFocus()
DoCmd.Restore
Me.Visible = False
End Sub
Private Sub Form_Open(Cancel As Integer)
Set rstAlwaysOpen = CurrentDb.OpenRecordset("tblDummy",
dbOpenSnapshot)
DoCmd.OpenForm ("Switchboard")
End Sub
------
The Switchboard amongst other has the code:
Private Sub Form_Activate()
DoCmd.Maximize
End Sub
------
My current code works, but my forms pop up and down a couple of times
before settling, I guess there must be a better/simpler way to open a form
hidden?
(I am using Acc97, but assume no relevant version changes on this?)
Thor Ivar Hellesoy, Norway