A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Error Message 3020 Update or CancelUpdate without AddNew or Edit



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old December 14th, 2006, 03:51 PM posted to microsoft.public.access.forms
ray
external usenet poster
 
Posts: 475
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.