M.4. Split Your Application

You've probably heard it many times: Your application should be split into a front-end application and a back-end database. The benefits are many, including the ability to easily switch back-end databases (for example, between Production and Test) and to deliver new versions of the application without disturbing the user's data.

Access provides a wizard to split databases, but it's easy to do yourself if you follow these steps. Also, it will improve your understanding of what splitting a database really does.

  1. Make a backup.

  2. Copy your database to another file, named something such as MyApp Data.accdb.

  3. Rename the first file to something like MyApp Application.accdb.

  4. In the data file, delete all objects except the tables. You can also delete configuration tables that you know will be in the front-end database.

  5. In the application file, delete the tables (except any local configuration tables). Then, on the Ribbon's External Data tab, use Import group Access, and then choose Link To The Data Source By Creating A Linked Table to link all the tables from the data file. (In earlier versions of Access you use File Get External Data Link Tables.)

Now that your database ...

Get Access™ 2007 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.