Adding new tables and modules to a split DB (1 Viewer)

darren_access

Registered User.
Local time
Today, 03:26
Joined
Jan 8, 2018
Messages
57
I have created a module for project estimating and split that database into a FE & BE.

I am now wanting to create a project billing module using some of the existing tables plus new tables.

I want to keep one BE. I would like the same FE as well but with a different home tab ie. "Billing" vs "Estimates".

I have made copies of the both the BE and FE named ...V2" and begun building out the tables in BE v2.

How do I now go about building the FE out on FE V2? How do I point the new FE to the new BE?

Thanks!

(Ugh I wish they'd move to SQL Server already!)
 

Cronk

Registered User.
Local time
Today, 20:26
Joined
Jul 4, 2013
Messages
2,774
Use the Linked Table Manager which has a button on the External Data tab on the ribbon bar.
 

darren_access

Registered User.
Local time
Today, 03:26
Joined
Jan 8, 2018
Messages
57
Use the Linked Table Manager which has a button on the External Data tab on the ribbon bar.[/QUOTE

Great, thkx. that worked

How do I make the new tables visible to the FE?

** i figured out using the new datasource then selected the new tables in the V2 BE.
 

Cronk

Registered User.
Local time
Today, 20:26
Joined
Jul 4, 2013
Messages
2,774
Use External Data to link the new files. (Search ms access link table for more details).
 

darren_access

Registered User.
Local time
Today, 03:26
Joined
Jan 8, 2018
Messages
57
Thank you Cronk. Before I begin the new module forms and reports, I am thinking that it may be better to create separate FE for the billing module. Is it ok to copy the existing FE and rename it as Billing, then remove the estimating forms and reports and begin coding the new stuff? thus ending up with 2 separate FE's pointing to the same BE?

from a maintenance point of view this might be better?
 

Cronk

Registered User.
Local time
Today, 20:26
Joined
Jul 4, 2013
Messages
2,774
As to splitting functionality, I am inclined to keep everything in the one front end unless the functionality is significantly disparate. You do whatever you think is best for your overall business requirements which I of course do not know. I doubt there is any absolute right answer.

If you keep copies of original work, you can delete whatever and can always copy back forms/modules/queries/reports if necessary.

If I have any doubt about whether I might want something in the future, I will preface whatever with a 'z'. (Quicker to rename than import.)
 

darren_access

Registered User.
Local time
Today, 03:26
Joined
Jan 8, 2018
Messages
57
As to splitting functionality, I am inclined to keep everything in the one front end unless the functionality is significantly disparate. You do whatever you think is best for your overall business requirements which I of course do not know. I doubt there is any absolute right answer.

If you keep copies of original work, you can delete whatever and can always copy back forms/modules/queries/reports if necessary.

If I have any doubt about whether I might want something in the future, I will preface whatever with a 'z'. (Quicker to rename than import.)

Great advice, thank you Cronk. I'll give this some more thought.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 06:26
Joined
Feb 19, 2002
Messages
43,484
If you put the new tables into the BE because they were related and you wanted to enforce RI, then I would keep the FE as one as long as doing so did not over complicate the interface and the security. If the functions are not performed by the same people or the security would become too complicated, I would use two FE's and one BE.

If the table have no relationships but the tasks are performed by the same person. I would use two BE's and one FE.

And finally, if the data is not related and the tasks are done by different people, then I would use separate FE's and separate BE's.

The point is to not make dependencies when none exist.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 05:26
Joined
Feb 28, 2001
Messages
27,320
This is also the time to talk about version control.

If after looking at the problem in depth, you decide that it needs to be a unified database (i.e. single BE, copies of a single FE), then you are looking at some versioning and other architectural methods to keep things going.

If all you were to do is to change features of the FE file, you could look up the articles here on the topic of "auto-update front-end" and other variants of that concept. But if you have the auto-update feature set up, you would just update the "master" copy of the FE file and let users download the new copy when they launched the script that has been published in this forum for that purpose.

When you are talking about a BE update, however, you want to do something a bit more thorough. In this case, if you DON'T have an auto-updater, you have a serious problem in that invariably, someone will try to run the wrong version of the FE against the new BE. The way I usually stopped this is I had a table that was NEVER actually written by any queries. It was my "this is the current version of everything" table, and I could look up the version info for the BE file.

In the FE file, I had a second version number that could be compared to the BE's version number. I had an opening form that checked versions and popped up a message with a nasty-gram in it if the version mismatch was about to occur.

The second part of your problem is split audience functionality. I don't know what you want to do (and to a minor extent, don't care), but this is how I approached it. I had a table of users in the BE and a complex opening form that was my dispatcher, control panel, whatever you wish to call it. The form's .OnOpen event would get information about the user and look up the username in the table. No such user? Go away (and you can Cancel an Open event, so it is a neat-and-tidy closure.) As an aside, this is also where I checked for version incompatibility, so I could again take advantage of the .OnOpen's ability to accept a Cancel.

If the Open event let you through, the .OnLoad routine of that form knew who you were and what role you play in the scheme of things because the .OnOpen routine looked that up and left behind the info where all other forms could see it - in a General Module dedicated to security issues. Everything I needed to keep, I left in Public Variables in the General Module which meant they were persistent. (There are other ways to skin that cat - that was the one I chose.)

The control panel's buttons were enabled or disabled in the .OnLoad routine according to who was using the database. So if you had accountants and auditors, some would see one set of buttons; some would see another set. Maintainers would see everything.

Obviously, if Pat's comments about separation of data make sense to you, then my methods would not be important.

Now, there IS a third viewpoint... If you really wanted two disparate and unrelated BE files to work from the same FE file, you can. I believe the limit is 16 database files can be open at once. The FE is #1, the BE is #2. You have room to open 14 more databases. The idea of determining roles at run-time doesn't prevent you from having a third (BE) file linked in to the common FE. You just can't have persistent relationships between data split between the two files. HOWEVER, there IS such a thing as having a "temporary" relationship between two tables as long as they are both visible. You implement this in the query design window in the area above the grid at the bottom. You would do this, not for a permanent relationship, but only for a temporary one that only applies to a given query.
 

Users who are viewing this thread

Top Bottom