我需要使用 VBA 或 Access SQL 获取表的所有列名并遍历它们进行验证,有没有人有解决方案,我已经搜索过谷歌无济于事。
最佳答案
这将工作
Set db = CurrentDb()
Set rs1 = db.OpenRecordset("Table1")
Dim fld As DAO.Field
For Each fld In rs1.Fields
MsgBox (fld.Name)
Next
Set fld = Nothing
关于sql - 获取列名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3343922/