I'm using the following code to create a field in a backend database named BackEnd.mdb. I can't seem to find a way to add a caption into the Caption property of the new field. It doesn't seem to be an attribute that can be added via the CreateField method though I'm sure I missed something.
Can someone point me in the right direction? Thanks
Set dbsData = OpenDatabase("C:\Program Files\TSRWIN\TSRDATA.MDB")
'Set tdfNew = dbsData.OpenRecordset("C:\Program Files\BackEnd.MDB")
Set tdfNew = dbsData.TableDefs("Table1")
With tdfNew
.Fields.Append .CreateField("Field1", dbText, 5)
End With
Can someone point me in the right direction? Thanks
Set dbsData = OpenDatabase("C:\Program Files\TSRWIN\TSRDATA.MDB")
'Set tdfNew = dbsData.OpenRecordset("C:\Program Files\BackEnd.MDB")
Set tdfNew = dbsData.TableDefs("Table1")
With tdfNew
.Fields.Append .CreateField("Field1", dbText, 5)
End With