Function ExportColumns()
DoCmd.RunSQL "delete * from A" 'A表为目标存放位置
Dim Conn As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim i As Integer
Dim Str As String
Dim Str1 As String
Dim Str2 As String
Dim Str33 As String
Set Conn = CurrentProject.Connection
Set Rs = Conn.OpenSchema(adSchemaColumns, Array(Empty, Empty, Empty, Empty))
Do Until Rs.EOF
'If Mid(Rs!table_name, 1, 1) <> "M" And Mid(Rs!table_name, 1, 1) <> "A" Then
If Mid(Rs!table_name, 1, 1) <> "M" Then
Str = Nz(Rs!table_name)
Str1 = Nz(Rs!Description)
Str2 = Nz(Rs!column_name)
DoCmd.RunSQL "insert into A (Tnam,des,Cnam) values (" & "'" & Str & "'" & "," & "'" & Str1 & "'" & "," & "'" & Str2 & "'" & ")"
End If
Rs.MoveNext
Loop
DoCmd.TransferSpreadsheet acExport, 8, "A", "Path", False, ""
End Function