W
wacntn
I have two forms and I want the user to be able to switch back and forth
between them. The forms use data from the same table and from only one
table. I have a button working on one form to go to the other form and to
'stick' to the record the user is on. But, when I try to do this on the
other form to go back, I get an error I can't track down following MS's
directions. Here's my code for the button. The error follows.
Private Sub Command2068_Click()
On Error GoTo Err_Command2068_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmProject Portfolio Maintenance"
stLinkCriteria = "[ProjectID]=" & "'" & Me![ID] & "'"
DoCmd.Close
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command2068_Click:
Exit Sub
Err_Command2068_Click:
MsgBox Err.Description
Resume Exit_Command2068_Click
End Sub
The following is in the msgbox that pops up when the button is clicked.
The expression On Click you entered as the event property setting produced
the following error:
Procedure declaration does not match description of event or procedure
having the same name.
Procedure].
* There may have been an error evaluating the function, event, or macro.
between them. The forms use data from the same table and from only one
table. I have a button working on one form to go to the other form and to
'stick' to the record the user is on. But, when I try to do this on the
other form to go back, I get an error I can't track down following MS's
directions. Here's my code for the button. The error follows.
Private Sub Command2068_Click()
On Error GoTo Err_Command2068_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmProject Portfolio Maintenance"
stLinkCriteria = "[ProjectID]=" & "'" & Me![ID] & "'"
DoCmd.Close
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command2068_Click:
Exit Sub
Err_Command2068_Click:
MsgBox Err.Description
Resume Exit_Command2068_Click
End Sub
The following is in the msgbox that pops up when the button is clicked.
The expression On Click you entered as the event property setting produced
the following error:
Procedure declaration does not match description of event or procedure
having the same name.
Procedure].
* There may have been an error evaluating the function, event, or macro.