Solved How to make a template from a split database? (1 Viewer)

frankt68

Registered User.
Local time
Today, 23:46
Joined
Mar 14, 2012
Messages
67
I don't have much experience in building databases with Access (or any other software ☹). I would appreciate it if someone could provide me with the info or step by step guidance on how to save an existing split database as a template. I have the latest version of Access 365.

Frank
 

NauticalGent

CopyPaster of the First Order
Local time
Today, 23:46
Joined
Apr 27, 2015
Messages
2,852
I am a little confused. Are you asking how to split a database?
 

frankt68

Registered User.
Local time
Today, 23:46
Joined
Mar 14, 2012
Messages
67
I am a little confused. Are you asking how to split a database?
No, I know how to do that. I wold like to make a template from an existing split database.
 

NauticalGent

CopyPaster of the First Order
Local time
Today, 23:46
Joined
Apr 27, 2015
Messages
2,852
I see. Not sure how to so that. Hopefully someone will come along and help you
 

Micron

AWF VIP
Local time
Today, 17:46
Joined
Oct 20, 2018
Messages
2,743
Pretty sure all you need to do is choose that option from Save As. I've only ever done it once and that was just an experiment for another thread. You are referring to saving the front end as a template, yes? There are other threads in this forum on the same subject. If I recall, the idea isn't all that great unless you don't mind re-saving it every time you want to make a change. My recollection is that you can't modify a template file, only a db created from it. Might benefit you to search the forum on db templates.
 

The_Doc_Man

Happy Retired Curmudgeon
Local time
Today, 16:46
Joined
Feb 28, 2001
Messages
16,796
Let's ask the next question that goes along with templates. Why? More specifically, what did you intend to do with this proposed template? HOW did you intend to use the template?

I have built a database for which certain elements had a template hidden inside the DB itself. But I have never had to build a full-blown database template.
 

frankt68

Registered User.
Local time
Today, 23:46
Joined
Mar 14, 2012
Messages
67
Pretty sure all you need to do is choose that option from Save As.
Micron thanks for your reply. With the simple "Save as Template" you can save only the front-end or only the back-end. So when you open the front-end template, you get a new database front-end that is linked to the "old" back-end. If you open the back-end template, you get a new database back-end, with no link to the front-end.
I guess the easiest option would be to combine front-end and back-end into one file, delete the data from the tables and save it as a template. Then I could open a new database based on this template, import the data and split it into front-end and back-end.
 
Last edited:

frankt68

Registered User.
Local time
Today, 23:46
Joined
Mar 14, 2012
Messages
67
Why? More specifically, what did you intend to do with this proposed template? HOW did you intend to use the template?
Well, I need an empty database, to import new data on an annual basis, to process data and prepare reports. New data should not be added to the existing data. Although I could delete the data from an existing file and save it with a new name, I do not want to do this because there could be some error and I could lose the data.
 

Micron

AWF VIP
Local time
Today, 17:46
Joined
Oct 20, 2018
Messages
2,743
A database per year is a bit unusual. Why is that? Even so, can't you alter table link paths in a db created from a template? Have to ask because I have never tried.
 

The_Doc_Man

Happy Retired Curmudgeon
Local time
Today, 16:46
Joined
Feb 28, 2001
Messages
16,796
Manually make a copy of the fully structured DB. Copy it to another file with a name like MyEmptyDB.MDB (or .ACCDB as appropriate).

Go into MyEmptyDB and empty it with suitable DELETE queries. Remember that relational integrity means you empty child tables first.

Now the next time you need your template, just copy it to a new name. In Access, there is the File System Object that will allow you to do a copy command that includes a new name for the thing being copied. Or, as rarely as you do this, build a batch job to do a rename and copy.

Going through the formality of a template is a pain in the toches. I've made a template file for Word because of my writing hobby and even THAT was a real pain to get right. I eventually did, but HOLY MOLEY what a convoluted process. Having done it once, I can do it easier the second time, but the instructions online were not 100% clear. And the difference between Word and Access is that your application doesn't really need a template. It can make do perfectly well using a blank copy.

But there is another issue to consider. The process you described can be managed another way by simply including a "date of import" field so that you can focus on one data set or another just by choosing the import date (or if you prefer, "applicability" date.) Queries can select for each year of applicability. You don't NEED to separate out data that badly as to have a whole new file.

However, here is ANOTHER approach. Go ahead and manually make the copy of the back-end file. Empty it out by manually making some DELETE queries that you just don't save. Now when the time comes, rename the previous backend for historical record-keeping purposes and then copy the empty backend to the same name as the previous backend. Access links its "native" backend files by name, not by any internal Windows File ID number or anything like that. So you can keep the FE, keep the BE structure, and not worry about templates. Run that little rename/copy script and you are all set up for the next cycle.
 

theDBguy

I’m here to help
Local time
Today, 14:46
Joined
Oct 29, 2018
Messages
10,106
Hi. Pardon me for jumping in... Just throwing it out there... If you can't make a template for a split database, maybe you can create an installer package instead. Just a thought...
 

frankt68

Registered User.
Local time
Today, 23:46
Joined
Mar 14, 2012
Messages
67
However, here is ANOTHER approach. Go ahead and manually make the copy of the back-end file. Empty it out by manually making some DELETE queries that you just don't save. Now when the time comes, rename the previous backend for historical record-keeping purposes and then copy the empty backend to the same name as the previous backend. Access links its "native" backend files by name, not by any internal Windows File ID number or anything like that. So you can keep the FE, keep the BE structure, and not worry about templates. Run that little rename/copy script and you are all set up for the next cycle.
Thank you, Doc_Man,

you made some good suggestions. The last one seems the best one to me. So I'll try with that.
 

The_Doc_Man

Happy Retired Curmudgeon
Local time
Today, 16:46
Joined
Feb 28, 2001
Messages
16,796
No problem. I figured if I tossed out a couple of approaches, one of them would be good for you. Glad to help.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom