Option Compare Database
Option Explicit
Public rs As New ADODB.Recordset
'Dim rs As New ADODB.Recordset
Private Sub Кнопка12_Click()
Dim i As Integer
With rs
With .Fields
.Append "ID", adInteger
.Append "Name", adChar, 55
End With
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.Open
For i = 1 To 1000
.AddNew
!ID = i
!Name = "value_" & CStr(i)
Next i
.UpdateBatch 'без этого в форме не отобразиться
End With
Set Me.Recordset = rs
|