Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock one record and dont alow other user to modify 2

Status
Not open for further replies.

JUANCARLOS

Programmer
Oct 30, 2000
61
0
0
PE
I detected when two user modify in the same time a record and the last user press save record, this record shows "#deleted".

I want a function that detects that the record is in use, and prevent other user to open it.

Some ideas, please help.

Thanks in advance.

JCHR
 
Set the forms record looks property to "Edited Record" and then use this in the forms current event
(StartIssue is one of my fields)

Code:
Private Sub Form_Current()
On Error GoTo InUse_Err
If Not IsNull(StartIssue) Then
   Me!StartIssue = Me!StartIssue
   Me.Refresh
End If
Exit Sub
InUse_Err:
If Err = 2448 Then
   MsgBox "Job In Use"
End If

End Sub
Hope this helps if not let me know

Jn88
Jn88@att.net
 
The problem appears when in a multiuser environment one user add a register in a form and another open the last register, when the second user wnat ti save the changes, this records colapses and generate #deleted.

Can help how to prevent this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top