G
Guest
Hi all,
I get an error: "You can't use the GoToRecord action or method on an object
in Design view." the error is generating on the GoToRecord line. Its a table
based form and it happens when i try to open an employee twice. The table PK
is autonumber (ID).
Any suggestions?
Here is the code of my procedure:
Private Sub Command11_Click()
On Error GoTo Err_Command11_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_verify_details"
DoCmd.GoToRecord , , acNewRec
Form.Refresh
Form.Visible = False
'DoCmd.Close
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command11_Click:
Exit Sub
Err_Command11_Click:
MsgBox " 111"
Resume Exit_Command11_Click
End Sub
I get an error: "You can't use the GoToRecord action or method on an object
in Design view." the error is generating on the GoToRecord line. Its a table
based form and it happens when i try to open an employee twice. The table PK
is autonumber (ID).
Any suggestions?
Here is the code of my procedure:
Private Sub Command11_Click()
On Error GoTo Err_Command11_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_verify_details"
DoCmd.GoToRecord , , acNewRec
Form.Refresh
Form.Visible = False
'DoCmd.Close
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command11_Click:
Exit Sub
Err_Command11_Click:
MsgBox " 111"
Resume Exit_Command11_Click
End Sub