The amazing disappearing VBA code

T

Tony Toews [MVP]

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
 
A

AccessVandal via AccessMonster.com

The ability to disconnect and re-map drives are disabled for the users in policies.

If the ability to remap the drives is disabled, how did the User with this
limited option to create a map drive from your script?

Is the script running as administrator as part of the policies at windows
startup? (Not referring to user startup)

As I had explained before (see other post in this thread), a mapped drive can
get disconnected due to many reasons. See Allen Browne’s site on Offline
folders.

http://allenbrowne.com/Access2007.html#Bugs

‘----------------taken from a Allen Browne’s site as above--------------------
-----------------
In some cases (prior to SP2), Access 2007 deleted the database when you
compact it. To prevent this:
· Apply Service Pack 2, or the April 16 hotfix.
· Do not store databases in offline folders. (There are known issues with
using Access databases in Windows off-line folders.)
· If you see the following dialog, DO NOT CLICK OK!!! Instead, open the
Windows Explorer, and make a copy of your database, as Access is about to
destroy it:
Microsoft Office Access can't delete database name.accdb after compacting it.
The compacted database has been named Database.mdb.
If you compact a database using the same name, Microsoft Access creates a new
compacted database and then deletes the original database. In this case,
however, the original database wasn't deleted because it is read-only.
If you can, remove the read-only status, delete the original database, and
then rename the new database using the original name.
If you can't remove the read-only status, inform your workgroup administrator.

‘-----------------------------------------------------------------------------
------------------
Although, it is not a mapped drive issue, it is the same problem of
disconnection issue. Both will suffer the same corruption problem you had
encountered.

You may need to check the hardware and software of the client and server that
might be an issue with mapped drives like when were the last updates from MS
or were there any updates at all. Sometimes missing updates can cause a
failure. Insufficient RAM can be also an issue of disconnection due to
resource management in the OS or any other application is hoarding RAM.

Although, 512Mb of RAM is good enough for Windows XP, OEM machines comes with
built-in Video and Sound and other hardware are notorious for taking up RAM.
Mapped Drives may not be part of RAM issue, but from my experience, they are.

It seems that you might have to get someone higher up or gather persons
involve rectifying, isolating and locating the problem in the site setup. MS
consultation may be a cost issue unless your have contracts with them.

Good luck and HTH.
 
S

Stewart Berman

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top