Go to the Macros tab on the database window and create a new macro called "Autoexec". You can do all kinds of stuff with it, but since I don't use macros I can't tell you how.
Alternately, you can just set a default form to start and put your code in that default form's On Open event, if you prefer VBA.