Private Sub cob_sqltable_Click()
Dim oTable As SQLDMO
Set oTable = oCurrentDB
If oCurrentTable Is Nothing Then
Set oCurrentTable = oTable
Else
If oCurrentTable
Exit Sub
End If
Set oCurrentTable = Nothing
Set oCurrentTable = oTable
End If
FillEmptyColsToIndex (True)
If cob_sqlrecord
cob_sqlrecord
End If
End Sub
Private Sub FillEmptyColsToIndex(bFill As Boolean)
If bFill = True Then
Dim oCol As SQLDMO
Set oCol = New SQLDMO
For Each oCol In oCurrentTable
cob_sqlrecord
Next oCol
End If
End Sub
[
From:http://tw.wingwit.com/Article/program/SQLServer/201311/22458.html