Solved

List of controls on form and data sources with VBA

Posted on 2014-11-13
2
287 Views
Last Modified: 2014-11-13
I have a database that has hundreds(!) of columns in one of the tables.  However, I don't think all of them are used.  Is there a way I can get a list of all the controls on a form and their column data source so I can weed out the unused columns in the table?

Sandra
0
Comment
Question by:ssmith94015
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 40440446
Dim ctl As Control
DoCmd.OpenForm "formx", , , , , acHidden
For Each ctl In Forms("formx").Controls
    If ctl.ControlType <> acLabel Then
        Debug.Print ctl.Name & "> Data Source : " & ctl.ControlSource
    End If

Next
0
 

Author Closing Comment

by:ssmith94015
ID: 40440543
Thanks, now at least I can get this database cleaned up.

Sandra
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question