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. |
#2
|
|||
|
|||
Error Message 3020 Update or CancelUpdate without AddNew or Edit
I think you're going to need to post the code in
txtFindAsUTypeValue_Change in order to troubleshoot this. Ray wrote: 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. |
#3
|
|||
|
|||
Error Message 3020 Update or CancelUpdate without AddNew or Ed
ManningFan,
Thanks for the quick response. I do not have any code built into txtFindAsUTypeValue_Change I thought the message may be asking for some code in the Change event of the text field that is currently missing but i'm not certain. The only code i have for that text field is on the form's On Load event that reads: Call FindAsUTypeLoad(Me) 'Store handle to this form's window gHW = Me.hwnd If IsHooked Then Call Unhook End If 'Call procedure to begin capturing messages for this window Call Hook I got that code and the field from an Allen Brown type as you search example if that makes any difference. Thanks! "ManningFan" wrote: I think you're going to need to post the code in txtFindAsUTypeValue_Change in order to troubleshoot this. Ray wrote: 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. |
#4
|
|||
|
|||
Error Message 3020 Update or CancelUpdate without AddNew or Ed
I don't see anything that looks blatantly troublesome, you might want
to put a breakpoint in the code (click on the gray vertical bar to the left of the code at the first line of the code and a little red dot will appear there) and use F8 to step through the code and see which line is causing the problem. Ray wrote: ManningFan, Thanks for the quick response. I do not have any code built into txtFindAsUTypeValue_Change I thought the message may be asking for some code in the Change event of the text field that is currently missing but i'm not certain. The only code i have for that text field is on the form's On Load event that reads: Call FindAsUTypeLoad(Me) 'Store handle to this form's window gHW = Me.hwnd If IsHooked Then Call Unhook End If 'Call procedure to begin capturing messages for this window Call Hook I got that code and the field from an Allen Brown type as you search example if that makes any difference. Thanks! "ManningFan" wrote: I think you're going to need to post the code in txtFindAsUTypeValue_Change in order to troubleshoot this. Ray wrote: 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. |
#5
|
|||
|
|||
Error Message 3020 Update or CancelUpdate without AddNew or Ed
Thanks again ManningFan, is there a reason why my F8 function would not be
working. I tried what you said and i just get a beeping noise from the computer. I'm sure i'm doing something wrong. "ManningFan" wrote: I don't see anything that looks blatantly troublesome, you might want to put a breakpoint in the code (click on the gray vertical bar to the left of the code at the first line of the code and a little red dot will appear there) and use F8 to step through the code and see which line is causing the problem. Ray wrote: ManningFan, Thanks for the quick response. I do not have any code built into txtFindAsUTypeValue_Change I thought the message may be asking for some code in the Change event of the text field that is currently missing but i'm not certain. The only code i have for that text field is on the form's On Load event that reads: Call FindAsUTypeLoad(Me) 'Store handle to this form's window gHW = Me.hwnd If IsHooked Then Call Unhook End If 'Call procedure to begin capturing messages for this window Call Hook I got that code and the field from an Allen Brown type as you search example if that makes any difference. Thanks! "ManningFan" wrote: I think you're going to need to post the code in txtFindAsUTypeValue_Change in order to troubleshoot this. Ray wrote: 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. |
#6
|
|||
|
|||
Error Message 3020 Update or CancelUpdate without AddNew or Ed
Not that I know of. Is the code window showing up when the code is
launched? Usually if there's a problem it will prompt you with an error message. Ray wrote: Thanks again ManningFan, is there a reason why my F8 function would not be working. I tried what you said and i just get a beeping noise from the computer. I'm sure i'm doing something wrong. |
Thread Tools | |
Display Modes | |
|
|