Hardship with localized version of access

P

pdarisse

Hello to all,

I recently began to support an access 2000 application programmed by
someone else than me. The original programmer poured a couple of
thousand hours in it, so you can expect it to be huge. He is not an
expert so I try to dive in the existing code as rarely as possible as
it is a textbook example of unmanageable code(90% of the macros are
named Macroxxx and the xxx count is up to 243, there are also about 150
queries, which are 75% unnamed as well). So basically I try not to
dive in when I'm asked to add features, instead prefering to understand
the small part that need modification and developping new code.

There is one annoying problem however : it was coded using the french
version of access 97, and later upgraded to 2000, still french. The
problem is that each time those queries try to get data from a form, it
tries to get [formulaires]!fieldxx!data, which is ok when using french
versions but a nightmare when trying to make it work in the english
version.

And since we're standarding our office version onto english ones, we're
facing this major roadblock. Is there a way for me to either make one
swift pass trough all queries and change all iterations of
[formulaires] to [forms] or add some DLLs from the french version while
we correct the bigger issue manually?

I've seen elsewhere people suggesting Speed Feret from Black Moshannon
to do it, but i'm reluctant to pay 200USD to use it just once
 
V

Vincent Johns

I have a couple of suggestions ... but I'm not an expert on this, never
having had to translate a large body of French-language VBA to English.
So I offer my ideas in the hope that they will be worth at least a bit
more than you're paying for them. ;-)

First, I assume you've backed up all of your existing code. That way,
if you do a global search-and-destroy operation, and discover that
you've destroyed a bit too much, you can go back and restore what you
shouldn't have replaced.

Also, you might consider copying the VBA code to a text file, do
whatever global search-and-replace operations you need to do, storing
the results into another text file, then use WinDiff or FC or some such
text-file-comparison utility to scan through the two files so that you
can review the changes and maybe change some of them back. That would
be way faster than doing the replacements one at a time and trying to
decide if you want to approve each one individually.

Instead of doing these replacements in Notepad, which has limited
pattern-matching ability, you might try using some other tool such as MS
Word, which allows you to specify regular expressions.

And even though I'd be inclined to proceed as you are doing, you might
still consider using that Speed Ferret, even though you say "i'm
reluctant to pay 200USD to use it just once" -- the point is that, if it
can save you US$500 of your time (and your customer's/boss's time),
that's probably what you should be doing. Balance that idea with the
likelihood that if you make the changes yourself, you'll come out of the
experience with a better idea of the program's structure. For example,
Speed Ferret probably can't suggest replacing [Macro137] with
[M_UpdatePayeeList], whereas you might be able to do that sort of thing.

In order to move all that SQL from inside Queries to a text file to do
what I suggested, I think you can easily write a VBA procedure to romp
through all the stored Queries and spit out their SQL as text records to
some file that you can then edit as text. It would make no sense to do
that for only a dozen Queries, but I think it would be worth while if
you have 300 of them.

HTH.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.

Hello to all,

I recently began to support an access 2000 application programmed by
someone else than me. The original programmer poured a couple of
thousand hours in it, so you can expect it to be huge. He is not an
expert so I try to dive in the existing code as rarely as possible as
it is a textbook example of unmanageable code(90% of the macros are
named Macroxxx and the xxx count is up to 243, there are also about 150
queries, which are 75% unnamed as well). So basically I try not to
dive in when I'm asked to add features, instead prefering to understand
the small part that need modification and developping new code.

There is one annoying problem however : it was coded using the french
version of access 97, and later upgraded to 2000, still french. The
problem is that each time those queries try to get data from a form, it
tries to get [formulaires]!fieldxx!data, which is ok when using french
versions but a nightmare when trying to make it work in the english
version.

And since we're standarding our office version onto english ones, we're
facing this major roadblock. Is there a way for me to either make one
swift pass trough all queries and change all iterations of
[formulaires] to [forms] or add some DLLs from the french version while
we correct the bigger issue manually?

I've seen elsewhere people suggesting Speed Feret from Black Moshannon
to do it, but i'm reluctant to pay 200USD to use it just once
 
Top