[AccessD] A diff program for Access?

Bill Benson bensonforums at gmail.com
Fri Nov 12 08:49:56 CST 2021


So if you learn to program the VBE uou can loop through an app’s  VBProject
with

Air code

For Each vbComponent in VBProject.VBComponents

>From there to get to code is

Vbcomponent.codemodule.lines (number of lines)

You need a reference to VBA Extensibility 5.something.

For excel you also have to trust VBA Object Model not sure with Access.

Programming the VBE is a very big undertaking if trying to write code,
fairly simple for reading.


There is also MZTools that lets you export all modules as bas and cls files
so you can compare them in winmerge. But that is gonna be better for
comparing one update to another. But it wil show you code modules on the
left that arenton the right in a somewhat user friendly format.

I am sure others can recommend more robust methods.

On Fri, Nov 12, 2021 at 9:27 AM Arthur Fuller <fuller.artful at gmail.com>
wrote:

> I don't suppose there exists such a thing, but who knows, there may be. I
> want to determine the differences down to every level between App A and App
> B. Is there a tool that can do that, or am I forced to walk hand by hand
> through  hundreds of modules, forms, queries and reports.
> This app has grown gargantuan over the years, and this is a very bad thing.
>
> Perhaps the first thing I need to do is identify all the "dead code" -- old
> subs and functions never called in the current implementation
>
> Next, I want to employ a technique I learned from Jim Dettman: forget the
> behemoth app model and instead create Microservices that do one thing, such
> as deliver a report. On occasion, this is not trivial: Access seduces you
> into thinking that reference to some open form are cool. I most
> emphatically disagree. If a Report needs parameters, then pass them, or
> alternatively refer to the return values of Static Functions.
> I think that I may be going against the stream here. So be it. I like to
> use the Access Wizards to create the basic code, but immeiately after that
> I separate the generated code for the button from the button itself,
> creating a new sub or function and changing the btton code to cal that Sub
> or Function. as a result, al the form/button-clicks are reduced to one line
> of code, not dependent upon the form whose buutton invokes a local event.
> NOT my way of coding. I choose to ship everything possible away frrom the
> form and refereences to its avlaue, and eventually all the code away from
> the form into a module that I can call from anywhere, given expected
> parameters.
>
> --
> Arthur
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list