Jump: Search:

Total Access Detective

Detective Info:

Why Detective?

Product Reviews 

"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

More Reviews

Additional Info:

 

 
Find differences between Microsoft Access databases and objects with Total Access DetectiveMicrosoft Access Object and Database ComparisonsDetect differences between Microsoft Access databases, object designs and data with Total Access Detective

Compare and Find Microsoft Access Module and Procedure Differences (VBA)

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:

  • Standard modules and classes
  • Modules behind forms
  • Modules behind reports

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.

Example of Differences Between Two Modules in the Same Database

See the results with reports listing the differences and the entire module.

Example of Code Differences Between Two Modules in the Same Microsoft Access Database
Example of Differences Between Two Modules in the Same Database

Smart Module Comparisons that Understand VBA Syntax

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.

Documenting Code Differences that Matter

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.

Procedures are Compared by Name

New and Deleted Procedures are Identified

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.

Line-by-Line Comparison of Identical Procedure Names

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)

Module Comparison Options

Total Access Detective offers some options for how modules are compared:

Options for Comparing Microsoft Access Module Text

  • Determine how many identical lines after a difference defines getting back in sync
  • Ignore blank Lines
  • Ignore case differences
  • Ignore comments
  • Ignore indentation differences

Resynchronize Lines

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.

Determine If Certain Differences Should be Ignored

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:

  • Ignore Blank Lines when extra or missing blank lines don't matter.
  • Ignore Case lets you avoid flagging differences in code due to capitalization. This is helpful if your modules have differences solely due to the way a variable or procedure is capitalized (all references to it will have the definition's capitalization). Rather than flagging all the references as different even though it doesn't affect the way the code runs, these can be ignored. Note this will also ignore case differences that may be relevant for text you display to the user.
  • Ignore Comments to only document changes with VBA code. The Total Access Detective VBA parser understands the difference between VBA code and comments in order to perform this smart module comparison.
  • Ignore Indentations to avoid flagging differences due to adding new logic blocks like IF..ENDIF, DO..LOOP, FOR..NEXT, etc. If you simply want to flag the start and end lines, but not the code in between which didn't change, select this option.

Block of Text Comparison

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.

Compare any two blocks of text, modules, or classes from Microsoft Access, Excel, VBA, VB6, etc.
Enter the Blocks of Text or Module Code to Compare

Treat the Text as Code (VBA and VB6)

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.

See the Text and/or Module Differences

The results are shown with options to print and export:

Text and/or Module Differences are Displayed with Options to Print or Export
Results of Text and/or Module Comparison

Total Access Detective Home

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright © FMS, Inc., Vienna, Virginia
Celebrating our 26th Year of Software Excellence