If you are able to close the whole database (not merely the code window)
without being prompted to save your code changes, then your database has
started to corrupt.
Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
For suggestions on how to prevent the problem, see:
Preventing Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-25.html
I'm guessing that #5 is the cause of your particular issue (i.e. editing in
break mode).