0

At my workplace we have a 20 year old VBA Access application. We tried to buy the source code from the guy 10 years ago, but he didn't want anyone to call him. He died five years ago. I've been tasked to rewrite this application using SQL and .NET, but it would be nice to be able to see what is going on inside.

The database administrators have to compact the file every week, because it wasn't meant to handle the amount of data we have in it. If something breaks, we are in trouble.

When I open the MBD file (while holding down SHIFT), I can see the tables and some queries. However, when I go to Visual Basic, I only see one blank project called master60, with no modules or forms visible. I can trick it a little bit by going to the performance analyzer, and on Current Database I select "VBA Project". Now, another project appears in the Project Explorer called acwztool. I can see forms and modules, but when I click on one of them, I get a "Project Locked" pop-up saying "Project is unviewable".

I tried adding a trusted location, I tried exporting all objects into a new Access database, and I tried some online suggestion of changing a value in a hex editor to unlock it. Nothing seems to work. I'm not sure what kinds of locks people can put on these databases. I'm never prompted for a password...it is just locked.

Any ideas on how to tackle this? I'm using Office 365.

  • 2
    I believe the `acwztool` project is a built-in access library and is unviewable for everyone. – Kostas K. Apr 14 '23 at 15:34
  • Yes, acwztool is just Access wizard stuff. If you don't get a password prompt for the VBA project, but don't see any modules, it seems that you are opening the **backend** database which contains only tables and queries. (And which is usually the one needing Compact&Repair.) -- The actual application logic is in the **frontend** (which will likely be an .mde). There will be forms and modules etc. – Andre Apr 14 '23 at 16:54
  • OK, now I'm starting to understand how this works. There is a program folder with an executable, and a bunch of business logic in dlls. There is, of course, the mdb file which holds the tables and stuff. There is no mde file anywhere. Is this something that can be decompiled to get at the vb logic? Or do I need a Ouija board? – Kellas Cat Apr 14 '23 at 18:25
  • Ok, then the exe + dlls *is* the frontend. From the age, it was probably done in VB6. You can look [here](https://stackoverflow.com/questions/414068/is-there-a-visual-basic-6-decompiler), but honestly, you are probably out of luck. -- With the backend DB, you at least have the data structure. – Andre Apr 14 '23 at 20:20
  • Access was and is often used as the database. But, the code and application may very well have been developed using c++, VB5, VB6, maybe even delphi (pascal). So, you might try to look at the .exe file with some kind of inspector. But, if that folder has a .exe file, then that means the application part was not written in ms-access, but in some other system - only the database looks to be access. So, even some commercial products like Simply accounting at one time used Access database, but the application was not written using access. – Albert D. Kallal Apr 15 '23 at 00:39
  • Thanks, you guys have been very helpful. From the looks of it...it seems like VB6. I'd attach a screenshot but I'm not sure how from here. I'll try some decompilers, but I can probably create a new application from just looking at it, and talking to the people who use it. – Kellas Cat Apr 18 '23 at 14:54

2 Answers2

0

Knowing it's an MDB and not an MDE, you should be able to unlock it by following this procedure: https://www.devhut.net/access-unlocking-an-access-vba-project/

which is quite similar to what's here for Excel: https://superuser.com/questions/807926/how-to-bypass-the-vba-project-password-from-excel

iDevlop
  • 24,841
  • 11
  • 90
  • 149
0

Access was and is often used as the database. But, the code and application may very well have been developed using c++, VB5, VB6, maybe even delphi (pascal). So, you might try to look at the .exe file with some kind of inspector. But, if that folder has a .exe file, then that means the application part was not written in ms-access, but in some other system - only the database looks to be access. So, even some commercial products like Simply accounting at one time used Access database, but the application was not written using access.

Sometimes, by just looking at the application, you can make a guess as to the tools used, sometimes not. But, since there seems to be a .exe in that folder?

You can open that .exe with say a hex editor - often you see bits and parts in the header that hints, suggests and "tells" what tools were used to create the application in question.

There are also a number of tools that can at least "open" a .exe file and give information about the .exe file -- often then one can determine the tools used to create the .exe.

Maybe your lucky, and it was written in say vb.net (I say lucky, since there are a number of de-compilers - that would in theory create/generate the source code used to create the .exe. However, if this is not a .net .exe, then things become more difficult to de-compile.

As noted, often just looking at a few of the other .dll's and what not will "suggest" what system was used. This is especially the case if you used such tools in the past.

Albert D. Kallal
  • 42,205
  • 3
  • 34
  • 51