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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My VBA code disappeared!!!

Status
Not open for further replies.

MaxZak

Programmer
Oct 5, 2001
116
IT
I've had the same problem a few times:
sometimes, when I close a form, Access asks me to save the form with another name; the result is that the form w/ the new name is complete (form+code), but the original one lost his code. What's appening?
I've Office 2000 Professional (updated with every SP and patches) on a Windows 2000 Pro.
 
This is a know BUG of Access 2000. Your VBA project is "corrupted" now.
How to avoid the problem:
always respond "no" if ACCESS asks you to save form modules that you definitely did not modify.
How to repair:
1. If you want to keep the form design (the VBA is lost anyway) then choose the property "WithModule=FALSE" and save the form. Then re-create the VBA Code.
BUT: Sometimes the problem persists, for this reason I strongly suggest:
2. Create a new MDB file and import all database objects EXCEPT the corrupted form.

Since you will loose your form completely you should always have a security copy somewhere with the "old version". I hope that you have one.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top