If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Caption Property of a Field
Is there a way to retrieve the Caption of a Table or Query field through VBA?
Thanks, Pflugs |
#2
|
|||
|
|||
Caption Property of a Field
On Thu, 13 Nov 2008 13:37:10 -0800, Matthew Pfluger wrote:
Is there a way to retrieve the Caption of a Table or Query field through VBA? Thanks, Pflugs Here's Tables..... Public Sub ShowCaptions() On Error GoTo Err_Handler Dim db As DAO.Database Dim tbl As TableDef Dim fld As Field Set db = CurrentDb For Each tbl In db.TableDefs On Error GoTo Err_Handler Debug.Print tbl.Name For Each fld In tbl.Fields Debug.Print fld.Name & " " & fld.Properties("Caption") Next fld Next tbl Exit_ShowCaptions: Set db = Nothing Exit Sub Err_Handler: Resume Next End Sub -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
Thread Tools | |
Display Modes | |
|
|