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

Has anyone experienced a loss of Form code? 1

Status
Not open for further replies.

vpellerito

Technical User
Sep 12, 2006
30
US
Working in Office Access 2003 (Access 2000 file format).

I found this Microsoft article that discusses this happening but it doesn't match my scenario.

I was working in a form and testing my code so I had the VBE window showing as I tested the form, stepping through code and the like. I probably compiled all the code a couple of times as well when I was working. I got to a point where I was satisfied with the form so I closed the form but I didn't close the database. I then got up to use the bathroom. When I came back, I opened the form and nothing worked. I checked the code behind the form and there was nothing... as if I dreamed up all of my work.

I noticed now that the HasModule property on the form is set to No. I didn't change that property knowingly, didn't mess with it in my code. What's more, I know that Access throws up a warning when that is switched to No. I was working late at night so there was no one else around to mess with what I was doing.

The Microsoft article listed above describes a loss of code happening when a new module is created in code but I didn't create a module in code. I did call other modules in my form code, however.

Any thoughts?
 
Thanks. No answer on what happened to me but plenty of ways to prevent further problems. Decompiling the FE on opening sounds like a good habit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top