Counting activeX controls in MS Access 2010

Does anyone know a way I can get a total count of all the activeX controls used throughout a large MS Access 2010 application? (Including the control name would be great)
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
You'd need to use some VBA code to run through each form and the controls collection, using TypeOf to determine the type of control.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Correct me if I'm wrong, but in almost every case the ActiveX control will add a reference to the database, so you could review the References to see what's been added. At least, that's been my experience with using ActiveX with Access - but again, I could be wrong about that.
Luke ChungPresidentCommented:
Our commercial product, Total Access Analyzer, performs comprehensive documentation and cross-referencing of your Access database.

The Database Summary report shows a list of all the ActiveX controls that are used in the database:
In that example of Northwind, no ActiveX controls are shown.

Part of the detailed analysis is the documentation of ActiveX controls in separate reports (or views) showing the list of ActiveX controls and reference reports showing where they are used:

ActiveX Controls Summary
ActiveX Control References
Sorted by ActiveX Type
Sorted by Object Name

Hope this helps.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Running something like this will give you the form name and the ActiveX controls within each form.  The results will show up in the Immediate Window with the total count at the end:
    Dim obj As AccessObject
    Dim ctl As Control
    Dim i As Integer
    For Each obj In Application.CurrentProject.AllForms
        DoCmd.OpenForm obj.Name, acDesign, , , , acHidden
        For Each ctl In Forms(obj.Name).Controls
            If ctl.Properties("ControlType") = acCustomControl Then
                Debug.Print obj.Name, ctl.Name
                i = i + 1
            End If
        DoCmd.Close acForm, obj.Name
    Debug.Print "Total: " & i

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jeffrey CoachmanMIS LiasonCommented:
To be clear:
Counting activeX controls in MS Access 2010
So you only want to count Active X controls ( for ex.: web browser, treeview, slider, ...etc) controls,  ...and not standard Access controls (Textbox, command button, combobox, ...etc)

Jeffrey CoachmanMIS LiasonCommented:
<No Points wanted>

If you want just the Access standard controls , just change IrogSinta code to:
    If ctl.Properties("ControlType") <> acCustomControl Then

If you want "All" the controls, comment out the IF block

Again,no points wanted as this is all piggy-backing on Ron's original code, so points to him...


KnowledgeWareAuthor Commented:
Thanks to all, awarded to IrogSinta (thanks Jeff for additional info) and yes Luke is right that Total Access Analyzer would do this - I need to upgrade to the 2010 version!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Responsive Web

From novice to tech pro — start learning today.