تفضل حسب الطلب
Dim x As Integer
Dim n As Long
x = DCount("id", "table1")
rsrce = Me.RecordSource
If x >= 10 Then
Me.RecordSource = "Table1"
Exit Sub
End If
n = Nz(DMax("id", "table1"))
If n = 0 Then
DoCmd.SetWarnings False
DoCmd.RunSQL "INSERT INTO Table1 ( id ) SELECT 1 AS Expr1"
DoCmd.SetWarnings True
End If
For i = 1 To 10 - x
n = n + 1
rsrce = rsrce & " Union SELECT " & n & " as a, null as b, null as c FROM Table1"
Next i
Me.RecordSource = rsrce & " ORDER BY Table1.id"
item2.rar