

ADO Method
The sample code in this article uses ActiveX Data Objects. For this code to run properly, you need to reference the Microsoft ADO Ext. 2.5 for DDL and Security Library.1. | Start Microsoft access and open the sample database Northwind.mdb. |
2. | Create a new module, and then type the following line in the Declarations section if it is not already there:
|
3. | Type or paste the following procedure:
|
4. | Click Immediate Window on the View menu or press CTRL+G to open the Immediate window. |
5. | To test this function, type the following line in the Immediate window, and then press ENTER:
? GetFieldDesc_ADO("Employees", "EmployeeID") Note that the description for the EmployeeID field is returned. |
DAO Method
NOTE: The sample code in this article uses Microsoft Data access Objects. For this code to run properly, you must reference the Microsoft DAO 3.6 Object Library. To do so, click References on the Tools menu in the Visual Basic Editor, and make sure that the Microsoft DAO 3.6 Object Library check box is selected.1. | Start Microsoft access and open the sample database Northwind.mdb. |
2. | Create a new module, and then type the following line in the Declarations section if it is not already there:
|
3. | Type or paste the following procedure:
|
4. | Click Immediate Window on the View menu or press CTRL+G to open the Immediate window. |
5. | To test this function, type the following line in the Immediate window, and then press ENTER:
? GetFieldDesc_DAO("Employees", "EmployeeID") Note that the description for the EmployeeID field is returned. |