I'm developing a function to get the data from a query. I want to have both the field name (same from DB) and the field description before my data. I found how to get the field name but I did not find a way to get the description, can someone help me?
This is my current code to get the field name (and how I tried to get the description is commented):
'-Get the table's data
Set rs = con.Execute("SELECT * FROM " & Sh.name)
'-Set the name of the fields
Dim TheCells As range
Set TheCells = Sh.range("A2")
For i = 0 To rs.Fields.Count - 1
TheCells.Offset(0, i).Value = rs.Fields(i).name
'TheCells.Offset(1, i).Value = rs.Fields(i).Properties("Description").Value
Next i