View Single Post
  #3  
Old December 14th, 2006, 04:10 PM posted to microsoft.public.access.forms
ray
external usenet poster
 
Posts: 475
Default 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.