Ask and you shall recieve:<br>
this is in Help, key in "Object Properties Example"<br>
Here are the results after I ran it. Description is the last item.<br>
---------------------<br>
Table2<br>
Name = Table2<br>
Owner = admin<br>
UserName = admin<br>
Permissions = 1048575<br>
AllPermissions = 1048575<br>
Container = Tables<br>
DateCreated = 2/14/00 12:35:56 PM<br>
LastUpdated = 2/22/00 2:13:31 PM<br>
OrderByOn = False<br>
Description = Sample Database<br>
<br>
-----------------------<br>
The following example uses the PrintObjectProperties subroutine to print the values of an object's Object properties to the Debug window. The subroutine requires the object type and object name as arguments.<br>
<br>
Dim strObjectType As String<br>
Dim strObjectName As String<br>
Dim strMsg As String<br>
<br>
strMsg = "Enter object type (e.g., Forms, Scripts, " _<br>
& "Modules, Reports, Tables)."<br>
' Get object type.<br>
strObjectType = InputBox(strMsg)<br>
strMsg = "Enter the name of a form, macro, module, " _<br>
& "query, report, or table."<br>
' Get object name from user.<br>
strObjectName = InputBox(strMsg)<br>
' Pass object type and object name to<br>
' PrintObjectProperties subroutine.<br>
PrintObjectProperties strObjectType, strObjectName<br>
<br>
Sub PrintObjectProperties(strObjectType As String, strObjectName _<br>
As String)<br>
<br>
Dim dbs As Database, ctr As Container, doc As Document<br>
Dim intI As Integer<br>
Dim strTabChar As String<br>
Dim prp As Property<br>
<br>
Set dbs = CurrentDb<br>
strTabChar = vbTab<br>
' Set Container object variable.<br>
Set ctr = dbs.Containers(strObjectType)<br>
' Set Document object variable.<br>
Set doc = ctr.Documents(strObjectName)<br>
doc.Properties.Refresh<br>
' Print the object name to Debug window.<br>
Debug.Print doc.Name<br>
' Print each Object property to Debug window.<br>
For Each prp in doc.Properties<br>
<br>
Debug.Print strTabChar & prp.Name & " = " & prp.Value<br>
Next<br>
<br>
End Sub<br>
<p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>