private sub delrec()
Dim Mydb As DAO.Database
Dim TabBiao As DAO.TableDef
Dim X() As String’存储字段名称
Dim I As Integer
Set Mydb = CurrentDb
Set TabBiao = Mydb.TableDefs(表名)
I = TabBiao.Fields.Count
ReDim X(I) As String
For I = 0 To TabBiao.Fields.Count - 1
X(I) = TabBiao.Fields(I).Name
MsgBox X(I)
Next I
For I = 0 To TabBiao.Fields.Count - 1
TabBiao.Fields.Delete X(I)
Next I