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!

Error: Couldnt Update record, Currently locked

Status
Not open for further replies.

ALRice

Programmer
Jul 17, 2003
11
0
0
US
I am getting the above error in my multi-user database when someone tries to add a new record to the database.

My database is set up as a split database with 2 tables in the backend, one for the file/project and another with the action currently taking place with that file. Data is entered through a form with a subform on the front end. The problem occurs when trying to enter a new record on the subform:

Record/Account: (info on form, from table 1)
George Jones at 1234 Anywhere St Nowhere Id

Action: (info on subform, from table 2)
1: Set up time for lawn mowing.
2: Wants garden weeded on Saturday

Both tables have autonumbers as the primary key. Table 2 has a field that is referenced to table 1 using the unique autonumber.

I believe it is a problem with the autonumber field in the second table, such as when a number is held in "limbo" because a record hasnt been really entered, but it locks everyone else from getting the next autonumber.

What can I do to correct this?

Please and thank you!

Aim for the moon, for even if we miss, we are still among the stars.
 
I have a similar problem and used the folowing code to reset the user to 0. Where fosuser is the login name. This is on a exit form. just to clean thin up. Hope it is of some use.

Dim rst As ADODB.Recordset
Dim cnn As ADODB.Connection
Set rst = New ADODB.Recordset
Set cnn = CurrentProject.Connection
Dim sql As String
sql = "Select * from Employees where login= " & "'" & FOSUser & "'"
rst.Open sql, cnn, adOpenKeyset, adLockOptimistic
rst!LogedIn = 0
rst.Update
rst.CLOSE
'End check name
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top