If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Error Message 3020 Update or CancelUpdate without AddNew or Edit
Hello and happy holidays...
I have an issue i hope I can find the answer to. I have a password protected command button on a form that will duplicate the record when the password has been entered. The form then duplicates the record but the problem is an Unbound textbox named "txtFindAsUTypeValue" is causing Error 3020 Update of CancelUpdate without AddNew or Edit on txtFindAsUTypeValue_Change and i can not move to any other records or complete any other actions. Here is the code i am using for the commad button that duplicates the record: Private Sub DupCurrentIssue_Click() 'Attached to On Click event of DupCurrentIssue Dim strPasswd strPasswd = InputBox("Enter Password", "Restricted Form") 'Check to see if there is any entry made to input box, or if 'cancel button is pressed. If no entry made then exit sub. If strPasswd = "" Or strPasswd = Empty Then MsgBox "No Input Provided", vbInformation, "Required Data" Exit Sub End If 'If correct password is entered copy current form 'If incorrect password entered give message and exit sub If strPasswd = "XXXXX" Then DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 Else MsgBox "Sorry, you do not have permission to duplicate this profile", _ vbOKOnly, "Important Information" Exit Sub End If On Error GoTo Err_DupCurrentIssue_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append Exit_DupCurrentIssue_Click: Exit Sub Err_DupCurrentIssue_Click: MsgBox Err.Description Resume Exit_DupCurrentIssue_Click End Sub Any help is greatly appreciated. |
Thread Tools | |
Display Modes | |
|
|