D
David G.
I want to assign English/Readable captions to all fields in any table.
If I manually add a caption to a field, I can edit the property later
in VBA. If the caption has never been set, I can't seem to be able to
add a Caption property to any field.
--code snippet
dim rs as DAO.Recordset
Set rs = CurrentDb.OpenRecordset("Select * FROM tblMyTable")
For i = 0 To rs.Fields.Count - 1
rs.Fields(i).Properties.Append & _
rs.Fields(i).CreateProperty("Caption", & _
dbText, fBuildCaption(rs.Fields(i).Name))
next i
--end code
I get "Invalid Operation. 3219" error message.
THANKS!
David G.
If I manually add a caption to a field, I can edit the property later
in VBA. If the caption has never been set, I can't seem to be able to
add a Caption property to any field.
--code snippet
dim rs as DAO.Recordset
Set rs = CurrentDb.OpenRecordset("Select * FROM tblMyTable")
For i = 0 To rs.Fields.Count - 1
rs.Fields(i).Properties.Append & _
rs.Fields(i).CreateProperty("Caption", & _
dbText, fBuildCaption(rs.Fields(i).Name))
next i
--end code
I get "Invalid Operation. 3219" error message.
THANKS!
David G.