Dim i As Long
Dim str As String
Dim rs As New ADODB.Recordset
CreateTestTable
rs.Open "tbl_TestChrW", CurrentProject.Connection, adOpenDynamic, adLockOptimistic, adCmdTable
For i = 0 To 1000
rs.AddNew
rs("number") = i
rs("chrw") = ChrW(i)
rs.Update
str = str & " " & i & ":" & ChrW(i)
DoEvents
If i Mod 20 = 0 Then
Debug.Print str
str = ""
End If
Next
rs.Close
DoCmd.OpenTable "tbl_TestChrW"
End Function
Function CreateTestTable()
On Error Resume Next
Dim strSQL As String
strSQL = "drop table tbl_TestChrW"
CurrentProject.Connection.Execute strSQL
If Err <> 0 Then
Debug.Print Err.Description
End If
strSQL = "create table tbl_TestChrW (ID AUTOINCREMENT(1,1),[number] long, [ChrW] text(2))"
CurrentProject.Connection.Execute strSQL
If Err <> 0 Then
Debug.Print Err.Description
End If