Record Locking problem

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
 
M

Mark A. Sam

I neglected to mention that the Backend is SQL Server. The table has a time
stamp so I opened it in a query with a calcalated expression on the time
stamp field,

Expr1: IsNull([upsize_ts])

The Expression returned -1 (true) for the record causing the problem and 0
(false) for the other records for this customer. However, there is no
problem adding data through the query's dataset, but there is from the
table's dataset.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top