If what you want to do can be done from a macro, you can create an "autoexec" macro that will run at startup.
If you want something to happen when you start up the database that can't be done from a macro, you could create a form and place the code in its "onLoad" event. Then goto tools => startup to set the form as your startup form. If you don't need it anymore, you can also have the code close the form when it's done running.