Compare all VBA-code in two versions of same DB

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to do that easily?

Since the code is spread in many modules it is difficult to make an
automated compare (unless you write some code to do it...).

I would like to have a compare facility that can detect changed lines and
added/deleted lines in all the VBA code.
 
Hi, Diane.
Is there a way to do that easily?

Of course. Use Visual Source Safe. It integrates with Access, as well as
other software development environments.
I would like to have a compare facility that can detect changed lines and
added/deleted lines in all the VBA code.

Changed lines, added lines, and deleted lines are color-coded, and the two
versions are compared next to each other for visual reference.

If you can't spring for this convenient tool, then you can always have DOS
compare the modules for you. Just copy the contents of each module into a
separate text file, then use the DOS file compare utility to compare the two
files and redirect the output into another text file that you can open in
Notepad and peruse. For example:

fc /n /c Module1.txt Module2.txt > compare.txt

Just open compare.txt to view the differences. Be aware that this isn't a
very robust utility, so if the files are too different, it will choke.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
Thanks.
How big a task is it to start using Visual Source Safe?
What are the initial steps..?
I basically only develop a couple DBs - so it is not like I have a lot to
register or what it is you do with VSS.

I thought about the DOS-compare - but would then need to write a small tool
that exports all by VBA-code - as I have maybe 50 modules and dont want to do
it manually.
Used to write mainframe code where everything was in a sinlge file - that
made the compare easy.
 
Hi, Diane.
How big a task is it to start using Visual Source Safe?

If you have an administrator doing the administration for you, then it would
take about 20 minutes to set up on your workstation and get you familiarized
enough with it to use the code comparison feature. If you have to do
everything yourself, then it's a major project to read all of the
documentation, install it on the networked server, install the client
software on your workstation, et cetera.
I basically only develop a couple DBs - so it is not like I have a lot to
register or what it is you do with VSS.

VSS is configuration control for multiple developers on a single software
project, but it can be used for multiple projects, too. It's probably
overkill for a single developer with only two small database applications.
But software configuration tools are where you're going to find the best code
comparison utilities.

I use Toad for comparing different versions of files, but it's also a tool
that's probably overkill for you. Perhaps someone else can offer some other
suggestions of a standalone utility for comparing code.
I thought about the DOS-compare - but would then need to write a small tool
that exports all by VBA-code - as I have maybe 50 modules and dont want to do
it manually.

Fortunately, that only takes a few minutes.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
Go to this site:
http://www.multieditsoftware.com/index.html
You can get a free demo version of MultiEdit. I used to use it for Clipper
and VB projects. It has some of the best features I have ever used.
I have not used it for Access, but my quess is you could copy you code to
text files, then use MultiEdit to do the compares. As I recall, it was
really great at that.
 
Back
Top