|
|
Getting the field caption property from code in Access97QuestionSince my field names for my tables and queries are not clear, I would like to get the field caption from the tables and queries through code so that I can put these on forms. Any ideas on how to do this? Answer
Function GetCaption(strTableName As String, strField As String) As Variant
on error resume next
GetCaption=dbengine(0)(0).TableDefs(strTableName).Fields(strField).Properties("caption")
End Function
HTH, Copyright © 1999-2008 by Shamil Salakhetdinov. Original version is published here. All rights reserved. |