fmm
Registered User.
- Local time
- Today, 10:47
- Joined
- Mar 15, 2001
- Messages
- 76
I'm trying to set up a queue for a form:
The table has a field called AccessStatus that is "0" if the record is available, "1" if it is not.
I'm trying to set the AccessStatus to "1" as soon as the form is opened, so that no one else can get it.
Here's the code:
Private Sub Form_Open(Cancel As Integer)
Dim dbs As Database
Dim rst As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qryAvailable", dbOpenDynaset, dbSeeChanges, dbPessimistic)
rst.MoveFirst
With rst
.Edit
!AccessStatus = "1"
.Update
End With
rst.Close
dbs.Close
End Sub
I can still get 2 users to see the same record. Any ideas?
thanks!
The table has a field called AccessStatus that is "0" if the record is available, "1" if it is not.
I'm trying to set the AccessStatus to "1" as soon as the form is opened, so that no one else can get it.
Here's the code:
Private Sub Form_Open(Cancel As Integer)
Dim dbs As Database
Dim rst As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qryAvailable", dbOpenDynaset, dbSeeChanges, dbPessimistic)
rst.MoveFirst
With rst
.Edit
!AccessStatus = "1"
.Update
End With
rst.Close
dbs.Close
End Sub
I can still get 2 users to see the same record. Any ideas?
thanks!