A2003 on Win XP
I'm made a button using the Button Wizard to duplicate (clone) a record on a form. I have 2 combo boxes used to search for records on different fields. Whenever I clone a record I get errors from the AfterUpdate of these combo boxes. The error is:
"3020 Update or Cancel Update without Addnew or Edit".
Here is my Clone button code:
The error actually occurs in cmdClone, and the error is "Select Record isn't available right now". I also have a subform on my form, is my subform the problem? I don't use any permissions on my database, anyone can edit anything.
I'll look into exactly which lines causes the error.
Any idea how to fix this?
I'm made a button using the Button Wizard to duplicate (clone) a record on a form. I have 2 combo boxes used to search for records on different fields. Whenever I clone a record I get errors from the AfterUpdate of these combo boxes. The error is:
"3020 Update or Cancel Update without Addnew or Edit".
Here is my Clone button code:
The error actually occurs in cmdClone, and the error is "Select Record isn't available right now". I also have a subform on my form, is my subform the problem? I don't use any permissions on my database, anyone can edit anything.
Code:
Private Sub cmdClone_Click()
On Error GoTo Err_cmdClone_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 ' Select record. Error occurs here.
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Exit_cmdClone_Click:
Exit Sub
Err_cmdClone_Click:
MsgBox Err.Description
Resume Exit_cmdClone_Click
End Sub
Any idea how to fix this?
Last edited: