One frontend for several backends at the same time

Posted on 2014-10-01
Last Modified: 2014-10-02
I have a split database with a frontend (FE.mdb) and several backend databases (one for each year: 2014.mdb, 2013.mdb, 2012.mdb, etc).
The problem arises when the user wants to have more than one year open at the same time (mainly by the turn of the year, when you have to work with data from the new year and data
from the previous year).
What happens is that if you are working with one year (2014.mdb) and you open another year (2013.mdb), the instance where you were working with the 2014.mdb data gets linked to 2013.mdb (specially the tables you hadn't open yet).
What I am doing is to open two instances of Access, each with the frontend database (FE.mdb), but the first one linked to 2014.mdb and the second one to 2013.mdb. However when you link the second one (2013.mdb) the first one (2014.mdb) gets also linked to the same bakend (2013.mdb).

Can anyone help me solve this problem?
Question by:soft7
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 100 total points
ID: 40355310
You can have multiple backend databases linked in the same frontend, but I don't think you can do it if the tables are named the same.

A better solution - don't store your data like this. Access isn't Excel, and you shouldn't store your data like it's in Excel. Instead, store ALL of your data in a single database, and then query those tables to get the right datasets - if you need 2013 data, then query your tables for all Dates in the 2013 year, and so on.

If you need to archive data - which is data that is set in stone (so to speak) and will never change, then it's okay to flatten out your tables and move that historical data to other databases - but you would rarely, if ever, need to join that archived data to the new data.
LVL 34

Accepted Solution

PatHartman earned 400 total points
ID: 40355469
I don't want to beat up on you but I'm with Scott.

The reason you can't do what you are attempting to do with a single FE is quite logical once you think about it.  Even though when you open a database, some of it gets loaded into memory but not all of it (a database is not a spreadsheet or word document - it is a collection object which is quite different logically), things that change get saved back to disk.  Therefore, when you relink the tables, you are changing something and it gets saved back to disk.  The connection string to a remote table is saved in the MSysObjects table and that is in the FE.  When you relink the tables, MSysObjects is updated so that the next time you open a table, it has the correct connection string.  It appears from what you indicated that the relink doesn't affect tables already open in the other database but that would be because the connection string has already been loaded into memory and Access doesn't need to retrieve it from disk each time the table is accessed.  But for tables that were not open at the time, Access has to go to the MSysObjects table which is now different than it was when the other tables were opened.

I hate to even offer the solution because what you are doing is so not Access but I will.  Copy the FE and name it MyFE_LastYear.  Leave the current database linked to the current BE.  Link the copy of the FE to last year's tables.  That way, if the user needs to have both years open, he can open the "production" database to see the current data and he can open the "last year" database to see last year's data.

Hopefully, you will take the expert advice to heart and start working on changing the database so that you don't create separate files for each year.  It will be a fair amount of work at this point because changes of this nature are always difficult whereas designing the app correctly from the beginning would have required little to no additional effort.  As it is you'll have to change many queries to select a specific year's data.  Of course anything that is already based on a date range can stay.

Author Closing Comment

ID: 40357725
You two are right, but Pat's answer is more complete and besides it offers me a very good and easy solution that works. So I am spliting the points but I'll give some more to Pat.
Thank you two for your answers.

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now