أى طريقة افضل
هذه
Dim dt As Date
Do While dt < Format(Date, "DD/MM/YYYY")
If dt = (Date) - 1 Then Exit Sub
DoCmd.GoToRecord , , acNewRec
dt = Nz(DMax("dater1", "table1"), Format(Date, "DD/MM/YYYY"))
dater1 = dt + 1
Loop
أم تلك
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("table1")
Dim dt As Date
Do While dt < Format(Date, "DD/MM/YYYY")
If dt = (Date) - 1 Then Exit Sub
dt = Nz(DMax("dater1", "table1"), Format(Date, "DD/MM/YYYY"))
rs.AddNew
rs("dater1") = dt + 1
rs.Update
Loop
rs.Close
Set rs = Nothing