Reputation: 4990
Where can I find a native list of MS Access properties available through:
CurrentDb.Properties("Property_Name_Here")
For example, I know;
For different versions I am sure there are different properties. Are there lists by version? So for example, MS Access 2003 has these properties... while MS Access 2007 has these properties... and so on.
Upvotes: 7
Views: 7516
Reputation:
Would this be ok? :)
Option Compare Database
Option Explicit
Private Sub btnShowDbProps_Click()
On Error GoTo Err_btnShowDbProps_Click
Dim prp As DAO.Property
Dim dbs As Database
Dim strProps As String
Set dbs = CurrentDb
For Each prp In dbs.Properties
Dim propval As String
propval = "<not defined>"
On Error Resume Next
propval = CStr(prp.value)
If propval = vbNullString Then propval = "<empty>"
strProps = strProps & prp.Name & "=" & propval & " (" & PropertyType(prp.Type) & ")" & vbNewLine
Debug.Print strProps
Next
MsgBox strProps
Exit_btnShowDbProps_Click:
Exit Sub
Err_btnShowDbProps_Click:
MsgBox Err.Description
Resume Exit_btnShowDbProps_Click
End Sub
Function PropertyType(intType As Integer) As String
Select Case intType
Case dbBoolean
PropertyType = "dbBoolean"
Case dbByte
PropertyType = "dbByte"
Case dbInteger
PropertyType = "dbInteger"
Case dbLong
PropertyType = "dbLong"
Case dbCurrency
PropertyType = "dbCurrency"
Case dbSingle
PropertyType = "dbSingle"
Case dbDouble
PropertyType = "dbDouble"
Case dbDate
PropertyType = "dbDate"
Case dbText
PropertyType = "dbText"
Case dbLongBinary
PropertyType = "dbLongBinary"
Case dbMemo
PropertyType = "dbMemo"
Case dbGUID
PropertyType = "dbGUID"
Case Else
PropertyType = "Unknown:" & intType
End Select
End Function
Upvotes: 1
Reputation: 91376
There is a properties collection:
Sub ListProps()
For i = 0 To CurrentDb.Properties.Count - 1
Debug.Print CurrentDb.Properties(i).Name
Next
End Sub
Upvotes: 7
Reputation: 16257
It's hard to find that kind of info.
I did find a link here for Access-defined DAO properties
Upvotes: 3
Reputation: 8716
I don't believe there is a list anywhere. Tho, the Properties property is a collection. You can iterate over them and get all the ones associated. You'd have to do this all the versions of MS Access you're interested in. To further expound, almost all the internal objects, e.g. tables, fields, queries, etc. have properties. The field properties are particularly useful as you can assign how MS Access links and displays the field to the user.
Upvotes: 10