October 14th, 1999, 05:30 PM
This is how I'm using lockedits property. See what it look like to you. An E-mail back at sfowler@mastnet.net
Public Sub TimeOut(pInterval As Single)
Dim sngTimer As Single
sngTimer = Timer
Do While Timer < sngTimer + pInterval
DoEvents
Loop
End Sub
Private Sub Command1_Click()
Static intTry As Integer
dim DB as Database
Dim A as String
Dim Dbs as Recordset
On Error GoTo errorh
set DB = Opendatabase("database Path")
set Dbs = DB.OpenRecordset("Table Name")
Dbs.Lockedits = False
Dbs.Edit
Dbs(A) = Text1
Dbs.Update
Dbs.Close
DB.Cose
Continue:
'Here trap your errors
errorh:
Select Case Err.Number
Case 3262, 3186, 3187, 3188, 3189
TimeOut 5
MsgBox "Time"
If intTry = 1 Then 'If you have 2 tries
If MsgBox("Do you want to try again?", vbRetryCancel) = vbRetry Then
intTry = 0
GoTo Continue
Else
intTry = 0
Exit Sub
End If
End If
intTry = intTry + 1
Resume
GoTo Continue
End Select
End Sub
Public Sub TimeOut(pInterval As Single)
Dim sngTimer As Single
sngTimer = Timer
Do While Timer < sngTimer + pInterval
DoEvents
Loop
End Sub
Private Sub Command1_Click()
Static intTry As Integer
dim DB as Database
Dim A as String
Dim Dbs as Recordset
On Error GoTo errorh
set DB = Opendatabase("database Path")
set Dbs = DB.OpenRecordset("Table Name")
Dbs.Lockedits = False
Dbs.Edit
Dbs(A) = Text1
Dbs.Update
Dbs.Close
DB.Cose
Continue:
'Here trap your errors
errorh:
Select Case Err.Number
Case 3262, 3186, 3187, 3188, 3189
TimeOut 5
MsgBox "Time"
If intTry = 1 Then 'If you have 2 tries
If MsgBox("Do you want to try again?", vbRetryCancel) = vbRetry Then
intTry = 0
GoTo Continue
Else
intTry = 0
Exit Sub
End If
End If
intTry = intTry + 1
Resume
GoTo Continue
End Select
End Sub