Is it possible to return the Description of a Table for VBA? If so, how? I am wanting to use the Description of the table in a form to update the end-user about which table is being dynamically processed.
Public Function tableDescription(tableName As String) As String
Dim Db As Database, Prp As Property
Set Db = CurrentDb
For Each Prp In Db.TableDefs(tableName).Properties
If Prp.name = "Description" Then tableDescription = Prp.Value
Next
Db.Close
Set Db = Nothing
End Function
For example, if the table MyTable has the Description as My Very Own Table, then:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.