Storing Constants - Q re tip from Klatuu

  • Thread starter Thread starter Jack G
  • Start date Start date
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top