I have a code that I need help with. I want to have a command button that will open a seperate form, after it opens, I would like for the original form to automatically close. the form is basically a splash form for entering a database, but it has two command buttons, Open_Main_Click and Exit_System_click. the first opens to the main menu of the database, and the second one closes the system. does anyone have any ideas on how to make it work. It would seem like a simple procedure but the if....then controls havent worked thus far. If you need more info, then I will get it for you. Thanx
ps: the open_form_click code is
private Sub Open_Main_Click()
On Error GoTo Err_Open_Main_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Main Page"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Open_Main_Click:
Exit Sub
Err_Open_Main_Click:
MsgBox Err.Description
Resume Exit_Open_Main_Click
End Sub
ps: the open_form_click code is
private Sub Open_Main_Click()
On Error GoTo Err_Open_Main_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Main Page"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Open_Main_Click:
Exit Sub
Err_Open_Main_Click:
MsgBox Err.Description
Resume Exit_Open_Main_Click
End Sub