Как сделать?
- Код: Выделить всё
Dim cat As ADOX.Catalog
dim DestTbl As ADOX.Table
Dim Col As ADOX.Column
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
Set DestTbl = cat.Tables(DestTblName)
On Error Resume Next
For i = 0 To Cntrl.ListCount - 1
IDFields(i) = "[" & Cntrl.ItemData(i) & "]"
DestTbl.Columns.Append "Korr" & i + 1, adDouble
If Err.Number <> 0 Then Err.Clear
Set Col = DestTbl.Columns("Korr" & i + 1)
Col.Properties("Nullable")=true 'Вот здесь и возникает ошибка
Next