Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Code quietly discarded on exit

Status
Not open for further replies.

MarkMyers

Programmer
Jul 14, 2003
5
AU
Hi All,

I have a problem that is hard to define and harder to track down. I am working in Access2002 (XP) on a mdb that is version 2000 (created by Access 2002). Every now and again (I can't be more specific) I loose the most recent changes made in VBA code when I close Access. I have compiled, saved and closed all modules and saved and closed all forms, checked that the code is there - Yes it is. Closed Access, re-opened and the code is not there. Othertimes everything works as expected and the code is saved. Just every now and again this happens and I loose code. Very frustrating.

Anybody seen anything similar?

Thanks in advance.
 
This sounds suspiciously like you make code changes with the debugger running. If so you could easily lose changes. If this rings a bell then set the breakpoint on a line of code then change a line and save. Stop the debugger and investigate whether the changes are saved. You may even test by closing Access and reentering.

This is just one alternative.


---------------------
scking@arinc.com
---------------------
 
I dont know if this is directly relevant, but I have had some problems developing an Access 2000 database in Access 2002.
At first it was a couple of silly things. The scroll arrows on a form would not work on a form when opened in access 2002, but would in 2000, and the autocomplete in a form text box became unreliable.
Then we had a corrupted database, where some VBA code was completely lost and some corrupted. BUT this only occurred when the database was opened in access 2000, it worked fine in access 2002.
A search of the MS Knowledge base, came up with no known problems with working on access 2000 format databases in access2002, and we never found an answer except to recover from backups.
Anybody else had any problems?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top