I am working with Access 2000. When a user is finished with a data entry form, I want to check to see if a field is populated correctly and fix it if it is not. When the user closes the form the field values are examined and if they aren't populated correctly I run the code below and get the following message:
The Microsoft Jet Database engine stopped because you and
another user are attempting to change the data at the same time.
Dim dbs As Database, rst As Recordset, IDSearch As Integer
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("NAMES"
IDSearch = Forms![frm_EditRecord]![MainID]
DoCmd.Close acForm, "frm_EditRecord", acSaveYes
rst.FindFirst "MainID = " & IDSearch
If rst.NoMatch Then
'leave records alone
Else
With rst
.MoveFirst
.Edit
rst!Displayorder = 1
.Update
.Close
End With
End If
dbs.Close
While running this code there is absolutely no one else using the database. I have no other processes occuring that are hitting the table I am working on. The table is a linked table to a SQL 7.0 backend.
Any thoughts?? This is making me crazy.
Thanks,
Jayde
The Microsoft Jet Database engine stopped because you and
another user are attempting to change the data at the same time.
Dim dbs As Database, rst As Recordset, IDSearch As Integer
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("NAMES"
IDSearch = Forms![frm_EditRecord]![MainID]
DoCmd.Close acForm, "frm_EditRecord", acSaveYes
rst.FindFirst "MainID = " & IDSearch
If rst.NoMatch Then
'leave records alone
Else
With rst
.MoveFirst
.Edit
rst!Displayorder = 1
.Update
.Close
End With
End If
dbs.Close
While running this code there is absolutely no one else using the database. I have no other processes occuring that are hitting the table I am working on. The table is a linked table to a SQL 7.0 backend.
Any thoughts?? This is making me crazy.
Thanks,
Jayde