Table of contents
TOC
折叠目录
展开目录

Application.ColumnHistory 方法 (访问)Application.ColumnHistory Method (Access)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

获取已存储在“备注”字段中的值的历史记录。Gets the history of values that have been stored in a Memo field.

语法Syntax

表达式ColumnHistory(* 表名 * ColumnName,* 查询字符串 *)expression. **ColumnHistory( ** TableName, ** ColumnName, ** queryString** )

表达式_一个表示应用程序对象的变量。_expression A variable that represents an Application object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
表名TableName必需RequiredStringString包含“仅追加”字段的表的名称。The name of the table that contains the Append Only field.
列名称ColumnName必需RequiredStringString要显示历史记录的字段的名称。The name of the field to display the history for.
查询字符串queryString必需RequiredStringString用于查找记录的字符串。这就像在 SQL 语句中,但没有单词 WHERE 子句中。A String used to locate the record. It is like the WHERE clause in an SQL statement, but without the word WHERE.

返回值Return Value

字符串String

注解Remarks

备注字段仅附加属性必须设置为True ,为了使 Access 存储字段的更改历史记录。A Memo field's AppendOnly property must be set to True in order for Access to store the change history for the field.

示例Example

下例在“立即”窗口中显示员工号 147 的薪金历史记录。The following example prints the salary history of employee number 147 to the Immediate window.

Sub colhist() 
 Dim sHistory As String 

 sHistory = Application.ColumnHistory("Employees", "Salary", "ID=147") 
 Debug.Print sHistory 
End Sub

另请参阅See also

概念Concepts

Application 对象Application Object

© 2018 Microsoft