VBA Problem "record locked"

harrisw

Registered User.
Local time
Today, 12:07
Joined
Mar 27, 2001
Messages
131
Is there anything I can do to get rid of an error "record locked couldn't update". I'm not in the tables at the time neither is anyone else. The database is on a network, whether that makes any difference, probably not.

Do Until Authcodes.EOF

Forms!frmprogressbar.Controls("ctlProgBar").Value = Forms!frmprogressbar.Controls("ctlProgBar").Value + 1
Codes.AddNew
Codes!accno = Authcodes!accno

If IsNull(Authcodes!branch) Then
Codes!branch = "0000"
Else
Codes!branch = Authcodes!branch
End If

If IsNull(Authcodes!dept) Then
Codes!dept = "00000"
Else
Codes!dept = Authcodes!branch
End If

Codes!Unique = Codes!accno & Codes!branch & Codes!dept
Codes!authcode = Authcodes!authcode

Codes.Update
Authcodes.MoveNext

Loop
 
Make a copy of the database file, then attempt to delete the original. If you can't, it may mean that the network still believes that the database is in use, even though it is not. That happens on our network from time to time, and we need to get the network admins. to zap it.
 
I'll give it a try

Many Thanks
 

Users who are viewing this thread

Back
Top Bottom