M
Mark A. Sam
Hello,
A particular application has been in use for 6 years, with this issue coming
up rarely on a form. I have seen it occassionally on another client's app.
Suddenly it is happening on a particular subform while adding a new record.
The message you will recognize without typingit all out:
"The record has been changed by another user.... Etc.
Save Record Copy to Clipboard Drop Changes
I won't allow editing. It also won't allow editing on the new record from
the table while the main form is open, however editing can proceed on any
existing record even if the subform is on a particular record.
The RecordLock peoperty is set to 'Edited Record'
This is Access2000 on Windows 2000 Server.
Here is the code to add the new record to the subform.
Private Sub New_Press_Click()
On Error Resume Next 'Unexplained Error occurs during [cpnumber] assignment
Dim i As Integer
i = Me.RecordsetClone.RecordCount + 1
'MsgBox Me.RecordsetClone.RecordCount
DoCmd.GoToRecord , , acNewRec
[cpnumber] = i
'MsgBox Me.RecordsetClone.RecordCount
'DoCmd.GoToPage 1
[cpManuf].SetFocus
'[cpnumber] = [cpnumber].DefaultValue 'Force record to create
DoCmd.RunCommand acCmdSaveRecord
[cboGoTo] = [cpid]
End Sub
I also noted that if I close the main form and open it again to the new
record, the problem occurs, but I also tested it when I could edit, so it
doesn't seem to be consistent.
Thanks for any help and God Bless,
Mark A. Sam
A particular application has been in use for 6 years, with this issue coming
up rarely on a form. I have seen it occassionally on another client's app.
Suddenly it is happening on a particular subform while adding a new record.
The message you will recognize without typingit all out:
"The record has been changed by another user.... Etc.
Save Record Copy to Clipboard Drop Changes
I won't allow editing. It also won't allow editing on the new record from
the table while the main form is open, however editing can proceed on any
existing record even if the subform is on a particular record.
The RecordLock peoperty is set to 'Edited Record'
This is Access2000 on Windows 2000 Server.
Here is the code to add the new record to the subform.
Private Sub New_Press_Click()
On Error Resume Next 'Unexplained Error occurs during [cpnumber] assignment
Dim i As Integer
i = Me.RecordsetClone.RecordCount + 1
'MsgBox Me.RecordsetClone.RecordCount
DoCmd.GoToRecord , , acNewRec
[cpnumber] = i
'MsgBox Me.RecordsetClone.RecordCount
'DoCmd.GoToPage 1
[cpManuf].SetFocus
'[cpnumber] = [cpnumber].DefaultValue 'Force record to create
DoCmd.RunCommand acCmdSaveRecord
[cboGoTo] = [cpid]
End Sub
I also noted that if I close the main form and open it again to the new
record, the problem occurs, but I also tested it when I could edit, so it
doesn't seem to be consistent.
Thanks for any help and God Bless,
Mark A. Sam