Having the code in two modules out of sync is very frustrating. You don't want to lose work you've done, bugs you've fixed, or features you've added. All it takes is missing one minor change to a line of code and your application crashes.
Total Access Detective makes it easy to find changes to your modules:
You can compare two modules in the same database, or identically named ones in two databases (MDB, ADP, or ACCDB formats). You can even compare any two blocks of text you type, paste, or load from files, including Visual Basic 6 (VB6) code.
See the results with reports listing the differences and the entire module.
Example of Differences Between Two Form Modules in the Same Database
There are lots of generic programs that can identify if two blocks of text are identical. Total Access Detective is a lot smarter than that.
By understanding VBA syntax, Total Access Detective doesn't get confused or flag differences that do not matter to you as a developer.
It knows that if you move a procedure from the top of the module to the bottom, it doesn't affect how your code runs. If it finds new procedures, it tells you that without listing its lines. The result is a compact summary of what's different so you can quickly determine the action you need to take.
Total Access Detective understands VBA/VB6 syntax and compares procedures against each other, so procedures are that are moved, but not changed are not flagged as being modified.
Procedures in one module and not the other are identified and listed by name. Their module lines (which could be huge) are not listed since you only need to know the names of the extra procedures:
Module [modUtility] does not contain Procedure [FMS_CopyRecord_New] Module [modUtility] does not contain Procedure [FMS_MsgInfo] Module [modUtility] does not contain Procedure [FMS_MsgYesNo] ------------------------------------------------------------- Module [basUtility] does not contain Procedure [FMS_CopyRecord] Module [basUtility] does not contain Procedure [FMS_EnterTableName]
Note: Our "procedure" comparisons also includes comparing properties by kind (Get, Let, Set) between classes.
Identically named procedures are compared line-by-line, and any line differences shown.
In this example, the first line that differs is 11. The second procedure has several additional lines. At line 15, it's back to the same as line 13 in the first procedure, and the subsequent lines match. Total Access Detective pinpoints and shows this block of differing code:
Procedure WordsInLine Module: [clsModule1] 11: strError = "No lines" 12: End If 13: For x = 1 to lngWordsInLine Module: [clsModule2] 11: strError = "No lines were found" 12: ElseIf lngWordsInLine = 1 Then 13: strError = "Only one line found" 14: End If 15: For x = 1 to lngWordsInLine
If the lines in the two procedures are completely different, a message mentions that and avoids listing all the lines. Again, another way Total Access Detective minimizes the results to what's important to you:
Procedure MyProcName Procedures are totally different (no lines match)
Total Access Detective offers some options for how modules are compared:
Module Text Comparison Options
After a difference is discovered, Total Access Detective looks beyond that line to determine if a block of text was added or deleted. By default, it determines the code is back in synch if it detects 3 consecutive identical lines in both procedures. You control how many lines are used to resynchronize your code.
By default, Total Access Detective flags every difference. However, you can relax this by ignoring differences that may not matter to you such as blank lines, capitalization (case), comments, and indentations:
Total Access Detective also performs module comparisons for text that isn't in an Access module. Whether it's text you paste in or text stored in a file on disk, Total Access Detective can reveal how they differ.
Enter the Blocks of Text or VBA/VB6 Module Code to Compare
Specify whether you want standard text comparison or code comparison. Text comparison just compares lines. Code comparison matches procedure-to-procedure (regardless of order) and then line-by-line within the procedure so you can see what really changed even if procedures are added, deleted or sorted. Total Access Detective understands Visual Basic/VBA syntax, so you can use this feature to compare modules from any Office program (Excel, Outlook, Word, etc.) or VB6.
The results are shown in three tabs with options to print and export:
The Text Block Differences tab is the main result showing differing blocks of VBA/VB6 lines in your module:
Results of Comparing Text or Microsoft Access VBA/VB6 Modules
List of procedures with no differences:
List of procedures with at least one difference:
New Version 14.5 for
New Version 12.9 for
Version 11.8 for
Versions 10.7 and 9.7 for
Access 2002 and 2000
Version 8 for
"Total Access Detective is well worth every penny, it will quickly pay for itself through savings in time and effort."
Tom Cryan, Denver Access User Group product review
PDF Fact Sheet