1. Compact to get rid of any old deleted code:
Tools | Database Utilities | Compact.
2. Open a code window, and choose:
Tools | References
Make sure none are marked "MISSING", and you do not have any references you
don't need. More on references:
http://allenbrowne.com/ser-38.html
3. Now, try a compile:
Debug | Compile
When it fails, search for another procedure that has the same name, in the
same module:
Edit | Find
4. If that does not find the culprit, search for a procedure with the same
name anywhere else in any module. If the other procedure does not use the
"Private" keyword, you may have found the culprit.
5. If that still does not identify the culprit, double-check that the
procedure has the correct arguments assigned. For example, if you have:
Private Sub Form_BeforeUpdate()
that will cause the error, because this particular event procedure should
have the argument "Cancel As Integer".
If that still does not solve the problem, the database is partially corrupt.
To rebuild it, try this sequence:
1. Using Access 2000, create a new (blank) database:
File | New
2. Immediately, uncheck the Name AutoCorrect boxes under:
Tools | Options | General.
For an explanation of why, see:
http://allenbrowne.com/bug-03.html
3. Import everything from the problem database:
File | Get External | Import
4. Deselect the references you don't need.
5. Compile the application.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
Kyle Rhoades said:
The problem is with all event procedures. The error message appears as
soon as each procedure is called. The debugger stops on the line with the
procedures name.