'Uses DAO, requires a reference to the Microsoft DAO 3.x Object Library
'(3.6 for Access 2000 or later, 3.51 for Access 97).
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim boolDone As Boolean
Set db = CurrentDb
Set tdf = db.TableDefs("YourTableNameHere")
For Each fld In tdf.Fields
If fld.name = "YourColumnNameHere" Then
boolDone = True
Exit For
End If
Next fld
At this point, if the column exists, the value of the variable boolDone will
be True.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.