The amazing disappearing VBA code

  • Thread starter Thread starter Chuck
  • Start date Start date
Just making another comment about the disappearing VBA code since I am the
original poster.

It continues to happen in our environment and it does indeed happen when
someone attempts to open the MDB or ACCDB file prior to the network drives
being mapped. We have tested this over and over and it occurs every time.
I just don't understand if you open a shortcut on your desktop to a MDB or
ACCDB file on a network drive and it isn't mapped yet, how the heck does
Access start and not return a file not found error. I've test this several
times and it attempts to open the database. Once that happens, the code is
corrupted.

We cannot split the database and put a front end on each desktop. No matter
what argument you have here in the group about that being the correct way,
as a military organization, that will not happen. I have tried to split the
database and still put the backend on a different drive, but it still the
VBA code gets deleted if the user opens the file prior to a complete map.

We have added a small script that will check for the existence of the map
drive and they are always the same assigned letters. The ability to
disconnect and re-map drives are disabled for the users in policies. No one
can add any hardware or put in USB drives because it will not be
recogonized. It is indeed a very tight sytem for the end user.

If the user runs the script, we have no problems with the code.
Unfortunately, I cannot stop someone from making a shortcut to the files.

I think at this point it is realized that the problem occurs, it is now a
matter whether or not Microsoft will look into it and see what the problem
is or how to prevent code from disappearing.

Thanks to everyone who made suggestions here.
 
AccessVandal via AccessMonster.com said:
Thank you. Hope that you can keep us informed of your results.

My testing In Windows Vista SP1 with Access 2007 SP1, if you have a missing
reference of a dll or ocx that’s not registered the computer it is possible
that you will loose the module codes. Access will prompt a message asking
whether to continue to open the Form with the “Yes” and “No” buttons. If you
click “Yes”, you’ll not loose the codes, but if you click “No” you’ll loose
the code and the database file will be corrupted.

The results are not conclusive, as the problem does not appear all the time.

If you could somehow get a 100% reproducible situation we'll fire it
off to Microsoft so they can fix this problem. This is one that I'm
sure they will fix ASAP.

Tony
 
Blue sky guess:

The problem is starting Access 2007 before the system is completely initialized not the drive
mapping.

Assuming you have a test machine that you can put the application database copy it down and change
the shortcut to point to it. Then run the same test -- clicking on the shortcut before the system
has completed initialization.
 
I am facing the same problem, but I am not working on any network. I am develloping a an access form on my own laptop, when suddenly all VB codes disappear. The file is about 10 M, and still cannot recover the lost data. I am thinking about re-writing it.

Chuck said:
I did discover today a new possibility on what is causing it.

Our ACCDB file is on a shared network drive. The drives are mapped for each
person as they logon to the computer.

...
...

Very odd behavior. I never had this problem prior to Access 2007.
 
Back
Top