
Help: Access 2.0 Function does not work with VB 3.0
Hans,
I haven't actually looked at your code but if you want a function to return the description of
a field you can use this function.
Function GetFieldDescription(ByVal TableName As String, ByVal FieldName As String)
Dim Db As Database
Dim Td As TableDef
Dim Fld As Field
On Error GoTo errGetFieldDescription
Set Db = DBEngine.Workspaces(0).Databases(1)
Set Td = Db.TableDefs("mp" + TableName)
Set Fld = Td.Fields(FieldName)
GetFieldDescription = Fld.Properties("Description")
EndGetFieldDescription:
Exit Function
errGetFieldDescription:
GetFieldDescription = Null
Resume Next
Resume EndGetFieldDescription
End Function
Hope this helps
Fergal Moran.