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
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