Shubham
Shubham

Reputation: 979

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 form2

Is there a way to get this functionality right when the database first opens?

Upvotes: 0

Views: 511

Answers (1)

AMissico
AMissico

Reputation: 21684

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.

Upvotes: 3

Related Questions