0. Find Orphan VBA Code (4:52)
How To Find Orphaned VBA Event Procedures From Deleted Control Code in Microsoft Access
Building an orphan VBA event code detector
Inspecting an Access form VBA module
Using Module objects and procedure line information
Using ProcOfLine to identify event procedures
Detecting missing controls for event code
Using the Controls collection to find controls
Using ProcStartLine and ProcCountLines
Creating a data-driven event procedure table
Scanning form-level and report-level event procedures
Moving the scanner to a global VBA module
Scanning individual forms and reports for orphans
Scanning all forms and reports in a database
1. Orphan Detector 1 (19:03)
Build an Orphan Code Detector Using the VBA Module Object
Orphaned VBA code behind Access forms
Access form Module objects
Access declaration lines and CountOfDeclarationLines
Looping through VBA module lines
Using CountOfLines in a Module object
Finding procedure names with ProcOfLine
VBA procedure ownership by line number
VB procedure types and normal procedures
2. Orphan Detector 6 (13:32)
Find Orphaned Click Events and Skip Through VBA Procedures
Identifying VBA Click event procedures
Extracting control names from procedure names
Checking whether form controls still exist
Detecting orphaned Click event procedures
Using On Error Resume Next for missing controls
Using ProcStartLine to find procedure starts
Using ProcCountLines to count procedure lines
Skipping VBA code one procedure at a time
3. Orphan Detector 6 (11:47)
Use an Event Table to Find Multiple Types of Orphaned VBA Code
Creating an event name table for orphan detection
Opening an event table recordset in VBA
Looping through event names with a recordset
Matching procedure names to control event names
Extracting control names from event procedures
Detecting orphaned control event procedures
Skipping form-level event procedures
4. Orphan Detector 6 (31:59)
Scan Individual Forms, Reports, or Entire Database for Orphan Code
Moving Find Orphans to a global module
Passing form and report objects to Find Orphans
Creating a form and report selector combo box
Loading database objects into a value list combo box
Scanning a selected form for orphan event procedures
Opening forms hidden for orphan scanning
Keeping already open forms from being closed
Adapting orphan detection for reports
Opening reports hidden for orphan scanning
Creating helper routines for form and report scans
Scanning every form in the database for orphans
Scanning every report in the database for orphans
Displaying orphan counts and object names
5. What's Next (9:06)
Review of Orphan Code Detection and VBA Maintenance Tools for Databases in Microsoft Access
Detecting orphaned VBA event procedures
Scanning form and report event procedures
Database-wide orphan code detection