On Tuesday (Oct 25) we started getting these two errors when trying to run certain reports and forms in an Access 2007 database that prior to this has worked without issues.
Its now Oct 26, 2011 and I have researched the problem all morning. I found several fixes for Access 2000, nothing for Access 2007. Our corporate laptops are running Windows XP and Office 2007, and are up to date on Service Packs.
When the problem first started, I would get the "Invalid procedure call" when I tried to run certain reports. The error pops up immediately, I OK the dialog and go into VB. The debugger is always stuck on the "Private Sub Report_Open(Cancel As Integer)" of the report I tried to run. If I clear it all and bring the report up in Design mode, I cannot click on the editor elipses in the Event tab of the Property sheet, even though it states [Event Procedure] right next to it. When I click on the elipses, nothing happens at all. If I delete all the VBA code, I can then bring up the Code Editor and there is a new Private Sub Report_Open(Cancel As Integer). Not all reports have this problem.
One of the first fixes I tried was to Compact and Repair the DB. That is when I started getting the "Error accessing file. Network connection may have been lost." error and noticed that I got it for certain Forms also. This one really made me scratch my head since there is no Network drive or connection involved in running this DB. The VBA issue appears to be the same however, in debug mode, stuck on Report_Open or Form_Open.
Currently I am working on building a new DB to replace this one, importing all of my reports forms etc after having set them to HasModule=No, but what a PITA.
Any ideas would be greatly appreciated
Thank you
Steven Wheeler