How to keep one form on top in A97?
How to keep one form on top in A97?
am 31.10.2007 19:12:47 von MLH
I have frmLogin running the following lines:
DoCmd.OpenForm "frmMainMenu", acNormal
DoCmd.OpenForm "frmWelcome", acNormal
DoCmd.Close A_FORM, ThisForm
frmMainMenu is opened first. Then, frmWelcome (which has
no border) is opened. The last line closes frmLogin.
frmWelcome is a form that opens for 3-seconds, then closes
under procedural control in the forms OnTimer event code.
Problem is, the instant frmWelcome opens, frmMainMenu
comes to the forefront and overshadows frmWelcome. So
the user does not get to enjoy the "Welcome Bob" message.
Not a big deal, I know. But I would like to make it work
Seeking suggestions other than acDialog? I do not want any
border and acDialog imposes its own. I was hoping a zero
dimension, tabbable, visible textbox would do the trick. But it
doesn't.
Re: How to keep one form on top in A97?
am 31.10.2007 19:21:15 von MLH
BTW, PopUp property setting messes
with my AutoCenter objectives. It will
keep the form on top, true enough.
But the form doesn't center in the
screen. I can use it, but I'm seeking
a better option.
Re: How to keep one form on top in A97?
am 31.10.2007 19:32:37 von Arno R
Did you try the pop-up property ??
DoCmd.OpenForm "frmWelcome"
BTW: what is a zero dimension, tabbable textbox ???
Arno R
"MLH" schreef in bericht =
news:40hhi3p9te1h6sr7pclnta7i19er6628nr@4ax.com...
>I have frmLogin running the following lines:
>=20
> DoCmd.OpenForm "frmMainMenu", acNormal
> DoCmd.OpenForm "frmWelcome", acNormal
> DoCmd.Close A_FORM, ThisForm
>=20
> frmMainMenu is opened first. Then, frmWelcome (which has
> no border) is opened. The last line closes frmLogin.
>=20
> frmWelcome is a form that opens for 3-seconds, then closes
> under procedural control in the forms OnTimer event code.
> Problem is, the instant frmWelcome opens, frmMainMenu
> comes to the forefront and overshadows frmWelcome. So
> the user does not get to enjoy the "Welcome Bob" message.
> Not a big deal, I know. But I would like to make it work
>=20
> Seeking suggestions other than acDialog? I do not want any
> border and acDialog imposes its own. I was hoping a zero
> dimension, tabbable, visible textbox would do the trick. But it
> doesn't.
Re: How to keep one form on top in A97?
am 31.10.2007 19:33:32 von fredg
On Wed, 31 Oct 2007 14:12:47 -0400, MLH wrote:
> I have frmLogin running the following lines:
>
> DoCmd.OpenForm "frmMainMenu", acNormal
> DoCmd.OpenForm "frmWelcome", acNormal
> DoCmd.Close A_FORM, ThisForm
>
> frmMainMenu is opened first. Then, frmWelcome (which has
> no border) is opened. The last line closes frmLogin.
>
> frmWelcome is a form that opens for 3-seconds, then closes
> under procedural control in the forms OnTimer event code.
> Problem is, the instant frmWelcome opens, frmMainMenu
> comes to the forefront and overshadows frmWelcome. So
> the user does not get to enjoy the "Welcome Bob" message.
> Not a big deal, I know. But I would like to make it work
>
> Seeking suggestions other than acDialog? I do not want any
> border and acDialog imposes its own. I was hoping a zero
> dimension, tabbable, visible textbox would do the trick. But it
> doesn't.
Do it a bit differently.
Code the frmLogin's Close event:
DoCmd.OpenForm "frmWelcome"
Code the frmWelcome Close event:
DoCmd.OpenForm "frmMainMenu"
This way, when the user closes the Login form, it will open the
Welcome form.
When the time closes the Welcome form, it will open the switchboard
form.
Note: acNormal is the default setting, so you don't need to explicitly
write it.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Re: How to keep one form on top in A97?
am 31.10.2007 19:57:13 von MLH
That's an idea, sure enough.
I wonder what is going on in frmMainMenu allowing
it to take over and jump to the front like that? It does
not seem logical. Maybe it's OpenEvent code will
shed some light - but I don't think so...
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
Dim ThisForm As String
ThisForm = Me.Name
If GetCurrentUserID() = "abc" Or GetCurrentUserID() = "def" Then
Me!AdminPortal.Enabled = True
Me!UserNameLbl.Caption = GetCurrentUserName()
Exit_Form_Open:
Exit Sub
Err_Form_Open:
Dim r As String, k As String, Message3 As String
r = "The following unexpected error occurred in Sub Form_Open, CBF
on " & ThisForm & "."
k = vbNewLine & vbNewLine & str$(Err) & ": " & Chr$(34) & Error$ &
Chr$(34)
Message3 = r & k
MsgBox Message3, vbExclamation, "Unexpected Error - " & MyApp$ &
", rev. " & MY_VERSION$
Resume Exit_Form_Open
End Sub