Filips Benoit wrote:
Field-caption not fieldnames.
Oh! Sometimes I read sloppy.
Can you live with a function that reads the captions (from the table
definition I presume) and returns a semicolon separated string?
Function getFieldCaptions(cTable As String) As String
Dim cRes As String
Dim db As DAO.Database
Dim td As DAO.TableDef
Dim fd As DAO.Field
On Error Resume Next
Set db = CurrentDb
Set td = db.TableDefs(cTable)
For Each fd In td.Fields
cRes = cRes & fd.Properties("Caption") & ";"
If Err = 3270 Then
Err = 0
cRes = cRes & fd.Name & ";"
End If
Next
Set td = Nothing
getFieldCaptions = Left(cRes, Len(cRes) - 1)
Set db = Nothing
End Function
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea