6.12. Append Only Fields
As mentioned earlier, you can create an append-only field by setting the AppendOnly property of a Memo field. In DAO, you can set the AppendOnly property of the Field2 object to True. When this property is enabled, the memo field keeps its previous values as the data in the field is changed. This happens regardless of whether you change the value in the Access interface or in DAO. In the Access interface only the current value is displayed.
This can be useful in many scenarios such as:
Call centers tracking correspondence with a customer
Keeping a maintenance history for an asset
Content tracking for a small content management system
While this feature is very powerful, there isn't a way to retrieve the history data for the field using DAO. Fortunately, the Access Application object has a method named ColumnHistory to retrieve this data. This, however, requires that Access is installed to retrieve this information. External applications will not be able to retrieve this data.
Some distinct limitations to the ColumnHistory method exist. First, the combined history is returned as a single string value. That means you have to parse the value to get something meaningful. You'll see an example of parsing this value shortly. Second, all rich formatting is removed. And finally, the date/time value in the string is localized, making it more difficult to write generic parsing code.
For tracking purposes, the column history also includes the date and time that the ...
Get Access™ 2007 VBA Programmer's Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.