Storing Constants - Q re tip from Klatuu

J

Jack G

On 9/26 Klatuu posted a neat method for storing constants in Access. He
described setting up new CurrentDB properties which are persistent. My
question - is there any way to see those properties if you don't know what
they're called (or if you created some and forgot what you called them)? I
tried right-clicking on the database window and looking at Properties, but
apparently the custom properties listed there are something else. I did try
the count method and found out that there are apparently 40 or so
properties - I just can't figure out what they are.

Thanks,

Jack
 
D

Douglas J. Steele

Sub ListProperties()
On Error Resume Next

Dim dbCurr As DAO.Database
Dim prpCurr As DAO.Property
Dim varValue As Variant

Set dbCurr = CurrentDb()
For Each prpCurr In dbCurr.Properties
varValue = prpCurr.Value
If Err.Number <> 0 Then
varValue = "**Unknown**"
End If
Debug.Print prpCurr.Name & " = " & varValue
Next prpCurr

Set dbCurr = Nothing

End Sub
 
J

Jack G

Thanks, Doug!


Douglas J. Steele said:
Sub ListProperties()
On Error Resume Next

Dim dbCurr As DAO.Database
Dim prpCurr As DAO.Property
Dim varValue As Variant

Set dbCurr = CurrentDb()
For Each prpCurr In dbCurr.Properties
varValue = prpCurr.Value
If Err.Number <> 0 Then
varValue = "**Unknown**"
End If
Debug.Print prpCurr.Name & " = " & varValue
Next prpCurr

Set dbCurr = Nothing

End Sub
 
Top