I would just delete the form and not worry about any other outside code that
may be associated with it. It is not as likely that procedures unique to
that form alone will be defined in standard modules. If you really insist
that all unique code be deleted, proceed as follows.
MAKE BACKUP COPIES
1. Turn on "Require variable declaration" in the options menu of the code
window.
2. Check for any global variables used on that form, but not declared there.
3. Look in the form too see if any outside procedure are called. Calling a
function will be proceeded by the word "Call" for user defined functions.
Right click on the function name and choose "Definition" to find the
associated code. Outside Subs are not proceeded by the word "Call", but can
be found the same way.
4. Do not delete any outside code yet, just mark the above with something
unique, like a comment with your initials and the date.
5. Delete the form, then compact the database.
6. Compile the database, correcting any undeclared variables.
7. Search for each of your marked comments, then do a search on each
variable or sub name that has been marked. If you find any, the code has
other use and can't be deleted. If not, go ahead and delete the unused code,
secure in the knowledge that you have good backups if things go wrong.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access