I have discovered another bug in Access 2007.
In A2007, empty event procedures are automatically removed when you compile.
This is A Good Thing, because of all the empty event procedures that Access
automatically creates. In earlier versions, these had to be manually
deleted if unwanted (or ignored if lazy).
However, in A2007, if said empty procedure happens to be the *last*
procedure in a module, compiling fails silently (without removing the
procedure), and if you then make an accde (or mde) file, it will appear to
have been sucessfully created *but no code will run in it*.
The solution is simple: track down and delete the empty procedure.
Allen Browne - 16 Jan 2008 11:34 GMT
Interesting observation, Baz, but I'm not seeing it.
I do see the empty event procedure removed when I compile.
That happens even if it is the last proc in the module, and the compile
succeeds.
Wonder what's different. Do you have Service Pack 1? I tried in the the
module of a form, using Access 2007 SP1 on Vista, starting msaccess with
RunAsAdmin. I also have Compile On Demand turned off (Tools | Options |
General, from the code window.)

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I have discovered another bug in Access 2007.
>
[quoted text clipped - 9 lines]
>
> The solution is simple: track down and delete the empty procedure.
Tony Toews [MVP] - 17 Jan 2008 04:50 GMT
>I have discovered another bug in Access 2007.
>
>In A2007, empty event procedures are automatically removed when you compile.
>This is A Good Thing, because of all the empty event procedures that Access
>automatically creates. In earlier versions, these had to be manually
>deleted if unwanted (or ignored if lazy).
I'm pretty sure A2003 does this as well.
Tony

Signature
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/