Solved

List of controls on form and data sources with VBA

Posted on 2014-11-13
2
288 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Introduction to Processes

726 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