The DO command
This is a very, very busy user interface. Focus on
the code. It is the big window on the right side.
The code begins with: Private Sub
It must finish with: End Sub
"Sub" means subroutine.
The action of opening a form is:
DoCmd.OpenForm stDocName
DoCmd is the method.
OpenForm is the command we chose with the
Wizard.
"Movies" is the name of the form you are
opening.
Error Trapping
The rest of the code looks for errors. If you spelled
the name of the form wrong, the subroutine would catch your mistake
and bring up a message box.
Error trapping is a good thing. It keeps the program
from running around in circles (an endless loop) or crashing.