I splited program and database as two mdb file, app.mdb and data.mdb. All tables are stored in the data.mdb file.
How to use code to link all tables in the data.mdb whe app.mdb open every time?
You don't have to link them every time you open the front-end. Just
go to Files --> Get External Information --> Linked Table Manager
and link the tables once and for all.
If the back-end "moves" around, you can link your tables dynamically: