D
Dale Fye
I've got a form that I use the following code to open.
Private sub lbl_Admin_Click
me.visible = false
DoCmd.OpenForm "frm_Admin"
'Don't go back to the main form while "frm_Admin" is loaded
While CurrentProject.AllForms("frm_Admin").IsLoaded: DoEvents: Wend
me.visible = true
end sub
I use this code, rather than opening the form in Dialog mode, because
"frm_Admin" has a couple of buttons on it that hide it, and open other forms.
If I didn't have the While:Wend loop in here, when I hide frm_Admin, my
splash screen would be made visible again.
This works OK, except that for some reason, when I open frm_Admin, it will
not allow me to perform any actions on the form until I have left the Access
window and set my focus on some other Windows application. If I [Alt-tab] to
another app, then back to frm_Admin, all of the controls (bound and othewise)
work properly.
I don't recall ever having had this problem in the past, and have used this
technique on multiple occassions. Would appreciate comments, or alternative
solutions.
Dale
Private sub lbl_Admin_Click
me.visible = false
DoCmd.OpenForm "frm_Admin"
'Don't go back to the main form while "frm_Admin" is loaded
While CurrentProject.AllForms("frm_Admin").IsLoaded: DoEvents: Wend
me.visible = true
end sub
I use this code, rather than opening the form in Dialog mode, because
"frm_Admin" has a couple of buttons on it that hide it, and open other forms.
If I didn't have the While:Wend loop in here, when I hide frm_Admin, my
splash screen would be made visible again.
This works OK, except that for some reason, when I open frm_Admin, it will
not allow me to perform any actions on the form until I have left the Access
window and set my focus on some other Windows application. If I [Alt-tab] to
another app, then back to frm_Admin, all of the controls (bound and othewise)
work properly.
I don't recall ever having had this problem in the past, and have used this
technique on multiple occassions. Would appreciate comments, or alternative
solutions.
Dale