Hi,
I have created Forms to use as navigation panes, and have inserted command buttons to go between the navigation panes or to open the forms for data input etc.
My main form is attached to Startup part of my database. Once I click on a button and it opens another form, I have a bit code in the button to make the form I was in not visible.
My problem is that when I go in and give it all a go, all of sudden none of the buttons work at all, and the only way to get out of the pane I am in is to click on the x at the top right hand side, where I am then out of the database. Its as if it gets stuck in a loop or something!
Should I be including somthing else in my code?
In all the control buttons I have the code looks like this, just referencing the relevant form.
Private Sub Command6_Click()
On Error GoTo Err_Command6_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Menu2MainMenu"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms![Menu1FrontScreen].Visible = False
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub
Thanks.
I have created Forms to use as navigation panes, and have inserted command buttons to go between the navigation panes or to open the forms for data input etc.
My main form is attached to Startup part of my database. Once I click on a button and it opens another form, I have a bit code in the button to make the form I was in not visible.
My problem is that when I go in and give it all a go, all of sudden none of the buttons work at all, and the only way to get out of the pane I am in is to click on the x at the top right hand side, where I am then out of the database. Its as if it gets stuck in a loop or something!
Should I be including somthing else in my code?
In all the control buttons I have the code looks like this, just referencing the relevant form.
Private Sub Command6_Click()
On Error GoTo Err_Command6_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Menu2MainMenu"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms![Menu1FrontScreen].Visible = False
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub
Thanks.