thanks for your responses!
My main thing is focus.
I have a form called frmName where the user enters his name/password.
That takes him to a form called frmSwitchboard. (where he can navigate through the database)
Between the two forms, my boss wanted me to make a pop up annoying form to remind the users of any late, or soon to be late projects. So I created a form called frmLateProjects.
So now on the FormLoad event of frmSwitchboard, I have DoCmd.OpenForm “frmLateProjects”,,,,acDialog.
On the OnOpen event of frmLateProjects I have the following code to close the form if there is no data:
On Error Resume Next
'if there are no late projects, display a message and close the form
If Me.ID_No.Value = "" Then
MsgBox "You have no late projects!", , "No Late Projects"
DoCmd.Close
End If
If Err.number = 2427 Then
DoCmd.Close acForm, "frmLateProjects"
End If
If I don’t open the frmLateProjects as Dialog, then frmName is the focus after the user closes frmLateProjects, not frmSwitchboard.
FrmLateProjects opened not as Dialog:
The user enters his name and password, then he sees frmLateProjects appear with its scroll bars. (good).
He closes frmLateProjects and sees frmName again (not good, I want him to see frmSwitchboard). frmSwitchboard is opened, it’s just not the focus.
FrmLateProjects opened as Dialog:
The user enters his name and password, then he sees frmLateProjects appear with no scroll bars. (not good).
He closes frmLateProjects and sees frmSwitchboard (good).
I need frmName to stay open, but I don’t want it to get the focus after the user closes frmLateProjects.
Overall, is there a more efficient way to do this pop up form thing? It seems a bit slow in general.
Thanks,
Ruth ruth.jonkman@wcom.com