更新表格的标题 [英] Update a table's caption

查看:56
本文介绍了更新表格的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我的第一篇文章。一种新手。我想以编程方式更新字段标题。 SQL或VB很好,表将始终具有要覆盖的现有标题。


你可以帮助我吗?

Hi- my first post here. Kind of a newbie. I want to update a fields caption programmatically. SQL or VB is fine and the table will always have an existing caption to overwrite.

Can u help me out?

推荐答案

@Davbib
@Davbib
  1. 我创建了一个通用函数,它将给定表中的字段标题更改为另一个标题,只需传递函数3参数:
  1. I created a Generic Function that will change a Field Caption in a given Table to another Caption, simply pass the Function 3 Arguments:
  1. 表名(strTableName)
  2. 原始字段标题(strOldCaption)
  3. 字段的新标题(strNewCaption)

展开 | 选择 | Wrap | 行号


如果您有一个字段对象,然后从那里引用将是:
If you have a field object, then from there the reference would be :
展开 | 选择 | Wrap | 行号


使用相同的字段,还可以添加或删除可选标题属性。以这种方式进行的更改是持久性的并影响表的设计直到更改。


要向字段添加 Caption 属性,首先需要创建属性对象,然后将此新对象附加到Properties集合。假设您的代码中 Field 对象已成为 With 语句的主题,则添加属性的单行可能是(避免变量):
With the same field, it is also possible to add or remove the optional Caption property. Changes made this way are persistent and effect the design of your table until changed.

To add a Caption property to a field you need first to create the property object, before then appending this new object to the Properties collection. Assuming you have code where the Field object has been the subject of a With statement, a single line to add your property might be (avoiding variables) :
展开 | 选择 | Wrap | 行号


这篇关于更新表格的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆