Access VBA: Is it possible to execute VBA code when the Access DB opens?
I have 2 forms I'd like to open when the Database opens based on a condition.
Basically If 'table1' exists in the database, then open form1
Else open form2Is there a way to get this开发者_开发百科 functionality right when the database first opens?
You can use the AutoExec macro and "run form". Create a macro called "AutoExec". Do what is needed in the macro.
There is also a "Display Form" under the "Application Options" that you can use.
精彩评论