Retriving database properties

  • Thread starter mr3316a via AccessMonster.com
  • Start date
M

mr3316a via AccessMonster.com

How can I retrieve information from the database properties so I can display
them on the main form of my application?
 
D

Daniel Pineault

Allen also has another funtion that could help you out, below is a very
slightly modified version of his original function

Function ShowDatabaseProps()
'Purpose: List the properies of the current database.
Dim db As DAO.Database
Dim prp As DAO.Property

On Error GoTo Error_Handler

Set db = CurrentDb()
For Each prp In db.Properties
Debug.Print prp.Name & ":: " & prp.Value
Next

Set db = Nothing

Error_Handler_Exit:
On Error Resume Next
Exit Function

Error_Handler:
If Err.Number = 3251 Then
Resume Next
Else
MsgBox "MS Access has generated the following error" & vbCrLf & vbCrLf &
"Error Number: " & _
Err.Number & vbCrLf & "Error Source: ShowDatabaseProps" & vbCrLf &
"Error Description: " & _
Err.Description, vbCritical, "An Error has Occured!"
Resume Error_Handler_Exit
End If
End Function

See his original function at:
http://allenbrowne.com/func-DAO.html#ShowDatabaseProps
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 

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

Top