السلام عليكم
كود احذف كل السجلات من كل الجداول يعطي خطأ
ارجو المساعدة
بارك الله فيكم
Dim db As DAO.Database
Dim td As DAO.TableDefs
Dim sql As String
Set db = CurrentDb()
Set td = db.TableDefs
For Each t In td
If Left(t.Name, 4) = "MSys" Or Left(t.Name, 1) = "~" Then GoTo Continue
sql = "DELETE t.* FROM t"
DoCmd.RunSQL (sql)
Continue:
Next
MsgBox " all records in all tables are deleted"
Me.Requery
Database1.accdb