A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Caption Property of a Field



 
 
Thread Tools Display Modes
  #1  
Old November 13th, 2008, 09:37 PM posted to microsoft.public.access.tablesdbdesign
Matthew Pfluger[_2_]
external usenet poster
 
Posts: 36
Default Caption Property of a Field

Is there a way to retrieve the Caption of a Table or Query field through VBA?

Thanks,
Pflugs
  #2  
Old November 13th, 2008, 10:31 PM posted to microsoft.public.access.tablesdbdesign
fredg
external usenet poster
 
Posts: 4,386
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:44 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.