OK, this answer will require some work and programming. I have only the beginning of the code that you will need, so you will have to do some research, as well as trial and error.
When you work in the VBA editor in Access, it is called VBE. It contains all the code in all forms of modules and reports. The debug.print lines are what you need.
If you go through a line and save it in the table, along with the name and / or name of the procedure (forms and reports) and save it in the table, you can then perform a compliance request to see which procedures are never called (they are listed as a procedure but not on any line of code.
Expect it to take several hours of your time to get better. But once you do this, you will have a good tool.
Function GetVBEDeatils2() Dim vbProj As VBProject Dim vbComp As VBComponent Dim vbMod As CodeModule Dim sProcName As String Dim pk As vbext_ProcKind Dim iCounter As Long Dim ProcLines As Long For Each vbProj In Application.VBE.VBProjects 'Loop through each project For Each vbComp In vbProj.VBComponents 'Loop through each module Set vbMod = vbComp.CodeModule iCounter = 1 Do While iCounter < vbMod.CountOfLines 'Loop through each procedure sProcName = vbMod.ProcOfLine(iCounter, pk) If sProcName <> "" Then Debug.Print vbMod.Lines(iCounter, vbMod.ProcCountLines(sProcName, pk)) Debug.Print iCounter = iCounter + vbMod.ProcCountLines(sProcName, pk) Else iCounter = iCounter + 1 End If Loop Next vbComp Next vbProj Set vbMod = Nothing End Function
source share