Hello !
I have a problem manipulating table data from an open form code.
I get run time error '3008' saying that the table is already open through the user interface and cannot be manipulated programatically. does anyone know how can I update the db using the form_timer (need to check and change according to time)?

the problematic code is:

Private Sub Form_Timer()
Dim dbs As Database
Dim rst As Recordset
Dim str As String
Dim tmpTimeCars As Long
Dim tmpTimeDay As Long
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("Cars", dbOpenDynaset, dbDenyWrite, dbPessimistic)
While Not rst.EOF
str = rst.Fields.Item(16).Value
tmpTimeCars = CLng(Mid(str, 1, 2) & Mid(str, 4, 2) & Mid(str, 7, 2))
tmpTimeDay = CLng(Mid(Time, 1, 2) & Mid(Time, 4, 2) & Mid(Time, 7, 2))
If tmpTimeDay > tmpTimeCars + 1000 Then
rst.Fields.Item(19).Value = False
End If
Set rst = Nothing
Set dbs = Nothing
End Sub