Accessing 'Description' information of Objects

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

By right clicking on a form or other object and choosing Properties, you can
add a Description for an object. Does anyone know how to add a 'Description'
via code? I would like to add a 'timestamp' to an object to create my own
'versioning' of an object.

I have many forms and reports that get modified for customers and it is
difficult to determine what version each one has.

If anyone has a better idea of how store version info, I'm open to
suggestions.
 
You can get the Description of Form1 like this:
Currentdb.Containers("Forms").Documents("Form1").Properties("Description")

Use error handling: if a form has no Description, this gives you error 3270,
and you need to CreateProperty.

There's a function in this link that sets the property if it exists, and
creates it if necessary:
http://allenbrowne.com/AppPrintMgtCode.html#SetPropertyDAO

Use the Description propety if you wish. But using that function, you could
create your own Version property if that would work better. Perhaps the
Currency type where the major version is the integer part, and the minor
version gives you up to 4 precise digits.
 
Thank you for the quick response.

This seems to be exactly what I was looking for. I will give it a try.

One additional question...if I create a new 'version' property where will I
be able to view it's contents?
 
If you create your own property that was not designed for the Access
interface, it won't show you the value. You would need to read it
programmatically.
 
Back
Top