Get column names

前端 未结 2 1423
终归单人心
终归单人心 2020-12-05 15:52

I need to get all of the column names of a table using VBA or Access SQL and iterate through them for validation, does anyone have a solution to this, I have searched Google

2条回答
  •  时光取名叫无心
    2020-12-05 16:04

    Dim l As Integer
    
    For l = 0 To CurrentDb.TableDefs("tbl_Name").Fields.Count - 1
      Debug.Print CurrentDb.TableDefs("tbl_Name").Fields(l).name
    Next l
    

提交回复
热议问题