Assuming you've got a reference set to DAO, something like the following
untested air-code will do it:
Sub ListTableFields(TableName As String)
Dim dbCurr As DAO.Database
Dim tdfCurr As DAO.TableDef
Dim fldCurr As DAO.Field
Set dbCurr = CurrentDb()
Set tdfCurr = dbCurr(TableName)
Debug.Print "Fields in table " & tdfCurr.Name
For Each fldCurr In tdfCurr.Fields
Debug.Print fldCurr.Name
Next fldCurr
Set fldCurr = Nothing
Set tdfCurr = Nothing
Set dbCurr = Nothing
End Sub
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"John T. McCraw" <jo*********@netzero.com> wrote in message
news:dd************************@posting.google.com ...
How can I retrieve just the column names from an Access table. I don't
need the data, just the column names.