Hi,
I have a form (with some fields) bound to a table. I use this form to add and delete records present in the table using save and delete buttons on the form.
I have entered all the details (with unique primary key field) in the form and hit save and able to save the record.
I have closed the form and reentered all the details which i have just now saved and clicked on delete. Then i'm getting the following error message
"The http://www.ozgrid.com/forum/autolink.php?id=51&script=showthread&forumid=7changes you requested to the table were not successful because they would create duplicate values.....".
I'm unable to understand why this error message is popping up. as i'm trying to delete the record, but instead its trying to create the record i guess.
I have the following code for delete button
Private Sub Command89_Click()
On Error GoTo Err_Command89_Click
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
Exit_Command89_Click:
Exit Sub
Err_Command89_Click:
MsgBox Err.Description
Resume Exit_Command89_Click
End Sub
Can any one help me out in resolving this issue. Thanks.
I have a form (with some fields) bound to a table. I use this form to add and delete records present in the table using save and delete buttons on the form.
I have entered all the details (with unique primary key field) in the form and hit save and able to save the record.
I have closed the form and reentered all the details which i have just now saved and clicked on delete. Then i'm getting the following error message
"The http://www.ozgrid.com/forum/autolink.php?id=51&script=showthread&forumid=7changes you requested to the table were not successful because they would create duplicate values.....".
I'm unable to understand why this error message is popping up. as i'm trying to delete the record, but instead its trying to create the record i guess.
I have the following code for delete button
Private Sub Command89_Click()
On Error GoTo Err_Command89_Click
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
Exit_Command89_Click:
Exit Sub
Err_Command89_Click:
MsgBox Err.Description
Resume Exit_Command89_Click
End Sub
Can any one help me out in resolving this issue. Thanks.