开发者

Access VBA: Is it possible to execute VBA code when the Access DB opens?

开发者 https://www.devze.com 2023-03-29 00:20 出处:网络
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

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 form2

Is 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消