G
Guest
I was wondering what the language was to change a field's caption
RD said:Well, a field doesn't have a Caption, it has a Name. Labels have Captions.
Try something like:
tdf.Fields(0).Name = "Feature ID"
HTH,
RD
This works for me in Access 2003
Currentdb.TableDefs("Faq1").Fields(2).Properties("Caption")="MyText"
The problem is that the Caption property does not exist until it is created
the first time. When you assign a caption in design view of a table, Access
will create the caption property and populate it with the value you specify.
Once that is done you can change the caption.
If you need to assign the caption to the field via VBA code and haven't
assigned a value to the caption at least one time then you need to create
the property and then set the value of the property. See CreateProperty in
the VBA help and check out the example code.
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.