Say you have a form named frmOne which has a command button with the code-behind as:
DoCmd.OpenReport "rptFoo"
And rptFoo uses qryFoo as its record source.
Enabling Track Name Autocorrect, then viewing the Object Dependencies for frmOne will not notify you that rptFoo is required by frmOne. It can however tell you qryFoo is required by rptFoo. Another issue is the object dependencies will not notify you that frmOne has been deprecated --- the current version is frmTwo.
Similarly, using Application.SaveAsText
to create text files for database objects, then grepping the text files would not tell you frmOne has been deprecated.
You could try a different approach to identify which of the database objects are required. Create a new database file. Import the startup form from the old database. Open the new database, and the form to identify the missing items it needs. Import those. Lather, rinse, repeat.
If the application isn't driven from a startup form, ask the users which forms and reports they use, then import those.
This approach will be tedious, and could take a few hours. However, I doubt the other approaches would be dramatically faster. On the plus side, you're pretty much guaranteed that you won't be importing unneeded objects into the new database. And if you miss anything which is needed, you can import that from the saved copy of the old database.
DoCmd.Close takes optional arguments that will make it much more reliable. For example,
DoCmd.Close acForm, "MyFormName"
Best Answer
When creating the button use the ampersand before the letter you want to Alt+? in the Caption property.
Examples:
&File ---> File
&Edit ---> Edit
F&orge --> Forge
E&nough -> Enough