hi everyone
i need some help with this code:
thanks
fafik1979
i need some help with this code:
problem is that after i delete record or few of them using delete_record_Click() vb is producing error Run-time '3167' Record deleted when i try to save bookmark in Form_Timer(), Bookmark_ = table.bookmark. i have tried to move to next record after deleting and some other things but nothing seems to work. i would appreciate any help with this. on more thing it is Access 2007.Private Sub Form_Timer()
Dim table As DAO.Recordset
Set table = Form_overview.RecordsetClone
On Error GoTo errhandler
If table.EOF Or table.BOF = True Then
GoTo end_:
Else
Bookmark_ = table.bookmark
table.MoveLast
b = table.RecordCount
table.MoveFirst
For counter = 1 To b
.
.
.
.
Next counter
End If
table.bookmark = Bookmark_
end_:
table.Close
noerror:
Exit Sub
errhandler:
error_ = Err.Description
'MsgBox Err.Description
DoCmd.SetWarnings False
DoCmd.RunSQL "insert INTO errorhandler VALUES ('" & Now() & "' , '" & error_ & "')"
DoCmd.SetWarnings True
DoCmd.Echo True
On Error Resume Next
End Sub
Private Sub delete_record_Click()
On Error GoTo Err_delete_record_Click
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
Exit_delete_record_Click:
Exit Sub
Err_delete_record_Click:
MsgBox Err.Description
Resume Exit_delete_record_Click
End Sub
thanks
fafik1979
Last edited: