Jump: Search:

Microsoft Access Developer Center

Table Design

Query Design

Form Design

Form Tips and Mistakes

Form Navigation Caption

First Item in Your ListBox

Validating Combo Boxes

Using a RecordsetClone

Synchronize Two Subforms

Late Bind Tab Subforms

Subform Reference to Control Rather than Field

Tab Page Reference

Report Design

Suppressing Page Headers and Footers on the First Page of Your Report

Add the NoData Event

Annual Monthly Crosstab Columns

Design Environment

Adding Buttons to the Quick Access Toolbar

Collapsing the Office Ribbon for more space

VBA Programming

Using Nz() to Handle Nulls

Avoiding Exits in the Body of a Procedure

Debugging Keys

Setting Module Options

Math Rounding Issues

Source Code Library

Microsoft Access Module VBA Library

Royalty Free VBA Modules

VBA Error Handling

Error Handling and Debugging Techniques

Error Number and Description Reference

Basic Error Handling

Pinpointing the Error Line

Performance Tips

Linked Database

Subsheet Name

Visual Source Safe

Deployment

Prevent Close Box

Disable Design Changes

Broken References

Simulating Runtime

Missing Package & Deployment Wizard

System Admin

Disaster Recovery Plan

Compact Database

Compact on Close

Database Corruption

Decompile Database

Bad DLL Calling Convention

Converting ACCDB to MDB

Cloud and Azure

Cloud Implications

MS Access and SQL Azure

Deploying MS Access Linked to SQL Azure

Additional Resources

Microsoft Access Help

MS Access Developer Programming

More Microsoft Access Tips

Technical Papers

Microsoft Access Tools

Connect with Us

Email NewsletterEmail Newsletter

FMS Development Team BlogDeveloper Team Blog

Facebook PageFacebook

Twitter with FMSTwitter

 

 

Splitting Microsoft Access Databases to Improve Performance and Simplify Maintainability

Provided by Aparna Pophale, Quality Assurance Specialist

Microsoft Access lets you easily create databases to store and present your data in forms and reports. When starting, a database may be very simple and trivial, but over time, it may become more critical as you add more data, features, and even share it with others. It gains a life of its own and the overall design becomes critical.

One of the most important architectural designs is splitting the database into a front-end and back-end database. This is the way Access was designed to let you support multi-user databases and significantly simplify how you enhance the application over time.

A Split Database Design: Front-End/Back-End Databases

Splitting a database is a relatively simple concept. You take an existing Access MDB/ACCDB database with its tables, queries, forms, reports, macros, modules, etc. and divide it into two databases:

  • The “Back-End” database just contains the tables
  • The “Front-End” database contains the application objects (everything except the tables) and links to the tables in the back-end database

This design is especially useful in multi-user environments where the back-end database is stored on a network and contains the shared data. Each user then has a copy of the front-end database on their desktop pointing to the shared database.

In multi-user environments, the front-end database can also contain tables that are private to the user. These local tables can store the user’s settings, selections, temporary or intermediate tables for processing data or reports, etc.

Reasons to Split a Microsoft Access Database

Here are some of the major reasons to use a split database architecture

  • Without a split database architecture, you’ll need to update the database with the latest data, people have changed with every new release.
  • Application enhancements are simplified since they are made in the front-end database without worrying about changes to the data in the back-end database. Releasing new versions and bug fixes becomes much easier since only the application part needs to be distributed. Of course, if you modify table structures or add/delete/rename tables, you’ll need to apply those changes to the back-end database.
  • Performance can be significantly enhanced and network traffic reduced when the user has a copy of the front-end database installed on their desktop rather than running it off the network each time they use it.
  • Temporary tables can be kept for each user in their front-end database. This avoids collisions among multiple simultaneous users if they were all using one database.
  • Without splitting a database, multiple users running the same database on the network increase the chance of database corruption. The split database design minimizes this problem and avoids code corruption from impacting data corruption.
  • This simplifies database administration since the data is stored centrally and can be backed up and compacted. A single master front-end application database is copied to each user’s machine, but is not necessary to back up.
  • Provides an opportunity to expand a database size beyond the 2 GB size limitation of Access since the front-end database can link to multiple back-end databases if necessary.
  • Sets the stage for migration to SQL Server. If the application evolves to need the features of SQL Server, you can still use the front-end database to link to data stored in SQL Server.

How to Split Your Microsoft Access Database

You can manually split your database by:

  1. Copying it
  2. Deleting all the non-table objects from one of them and make that your back-end database
  3. Delete all the tables from the other “front-end” database, then link to the tables in the back-end database.

Or, you can use the Microsoft Access Database Splitter Wizard to split the Access database. Consider this example:

Open a Tasks template form Microsoft Access 2007. The Tasks database is designed with tables, queries, forms and reports. The database contains 3 tables Contacts, Filters and Tasks. To open a Database Splitter, select Database Tools tab from Access ribbon and click on Access Database option.

Sample Microsoft Access Database to Split

Database Splitter wizard starts.

Database Splitter Wizard for Microsoft Access

Click on Split Database button and it opens the Save dialog window. Provide name for back-end copy.

Database Splitter Wizard: Back end location

So "Task_Back-EndCopy.accdb" name is provided here for Tasks database. This back-end database copy can be saved on a network to share among multi users and front –copy can be available to each user separately at their own desktop.

When the confirmation message box shows, click the OK button.

Database Splitter Confirmation

Now take a look at the tables in the Navigation pane, which show small arrows at the left side of the table names. This indicates that these three tables are now linked to the Tasks database, and resides in the Back-end database.

Linked Tables to Back End Microsoft Access Database

So this way the front-end copy will have all forms, reports and queries (no tables). Data changes made in the front-end copy will also update the back-end copy, which stores only tables. Now add a new record to the Contact List, save and close the database.

Adding a New Record to the Linked Table

If you open back-end copy of the database and select Contacts table. This new record appears in the table.

Back end Access database with updates

This way all users work on the same database using their own front-end copy, and data changes reflect in the back-end database. Split database architecture gives a look of Client-Server database technology by storing database tables at back-end server and all programming part such as forms, function, queries at front-end client side.

Access databases can link to older versions of Access database formats. So even if the front-end database is in an Access 2007 ACCDB format, the linked back-end database can be an MDB in Access 2000 or 2002-2003 formats or an ACCDB.

Keeping Private Tables

If you want to have private tables in the front-end database, you’ll want to import them into your front-end database and remove them from your back-end database. One of the amazing and powerful features of Microsoft Access is its ability to use data from a local or linked source in its queries, forms, reports, macros, and modules. If you need to change the table’s location later, you can move it without impacting the objects that depend on it.

One caveat is that if you have tables with field lookups to other tables, those tables should be in the same database. Otherwise, if you open that source database and that table, its lookups won’t appear which can cause data entry and data integrity issues.

Relinking Microsoft Access Tables

Once the database splitting procedure is finished, you can relink the linked tables using Linked Table Manger.

Let’s see how to use Linked Table Manager.

Linked Table Manager for Microsoft Access

Go to Database Tools from Access 2007 ribbon and select Linked Table Manager. In earlier Access versions, it's under Tools, Database Utilities.

Linked Table Manager Wizard to Select Tables and New Location

Select the table names which you want to update and click on Ok button. If you want to link to a database located in another drive or folder, check the Always prompt for new location box. This is common if you develop the front-end database on your local drive with a local copy of your back-end database (to avoid testing on the live data), then need to deploy it.

Always make sure that links are correct before you distribute them. It shows message for successfully linking.

Your front-end database is now properly linked and ready for deployment across your network.

Managing Front-End Databases on Each Desktop

With a split database design, you'll need to distribute the front-end database to each user. By residing on their local machine, the performance of your application will improve. However, this adds an extra level of complexity when your application changes.

Knowing an Update Exists

If you have a new version of your front-end database, you'll need to replace each user's database with the new one. This means your front end database needs to know what version it is and not run if it's not the current one, and provide a mechanism to get an update.

This can be easily done by adding a version table in the front-end database and the back-end database. You manually update the table in the front-end database with its version number when you create a new build. The back-end database contains the latest version number. When the front-end database starts, it compares the two tables and proceeds if the version is okay and stops if not. You'll then need a process to replace it.

Automate distribution of front-end Microsoft Access database applicationsAutomating the Version Detection and Update Process

FMS offers a commercial software product, Total Access Startup, to simplify the deployment of your Access applications. It lets you centrally manage each Access application by identifying the master front end database, the location where it should be installed on each user's desktop, and its version.

Rather than running the Access database directly, a shortcut is provided to each user so the Total Access Startup program verifies the right version of Access is being launched with the right version of your front-end database. If the current local database doesn't exist or is out of sync, the latest version is installed on the user's desktop along with any setup routines that are required. The process is seamless and you can easily change the deployments centrally. Only one copy is needed to manage all the Access applications across your network.

Additional Resources

Multi-user Microsoft Access applications are pretty important to your organization. FMS offers additional resources designed for this environment:

  • Total Access Analyzer to help you create and diagnose your databases to find errors, suggest enhancements, and improve performance.
  • Total Visual Agent to ensure your database maintenance tasks like database backups and compacts are scheduled and executed. Can also launch processes on a recurring basis.
  • Total Access Admin to monitor in real-time who’s entering and exiting in your Access database.

Performance Tip

Microsoft Resource

Conclusion

Microsoft Access is a very powerful platform that lets you easily create solutions that can significantly improve the productivity of your team. With a properly split database architecture, you’ll find it even easier to create, enhance, and share your application.

Good luck!

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright © FMS, Inc., Vienna, Virginia
Celebrating our 26th Year of Software Excellence