Creating an Access "template"

Fellow Experts,

My company uses an Excel-based survey template, but I am thinking that it may be better suited to Access.

What I would like to be able to do is set up something similar to a template in other Office apps, so that
when someone hits File|New from the menu, the template will show up in the list of general templates,
and that a new mdb file will be created that has the tables, forms, queries, and reports I define, but no
real data.

I do not need a full-blown "Access wizard template", as each new mdb will always have the same objects
(I do not need the pick-and-choose options available in the template wizard).

I know this question is kind of vague, but any shoves in the right direction would be appreciated :)

Regards,

Patrick
LVL 93
Patrick MatthewsAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
stevbeConnect With a Mentor Commented:
hmmm ... how about an mdz that when it opens it does a FileCopy of the real template? Then opens the File with Shell and then closes itself?

Unlike Excel and Word, Access does not have a concept of a file that has never been saved ... think about what happens when you File -> New ... the first thing it does is ask for a location to save the file to.
0
 
rockiroadsCommented:
As I understand, template databases have a suffix of .mdz and usually exist in the tempates directory of the office installation e.g. C:\Program Files\Microsoft Office\Templates\1033

I dont know of any way of creating .mdz files but when u click File/Open and select Templates/On My Computer, that is where you are presented with a list
0
 
rockiroadsConnect With a Mentor Commented:
Patrick, Ive been searching Google on ways of creating mdz, there doesnt seem to be anything out there
I found a couple of hits with EE , and it appears you cant do anything really - http://www.experts-exchange.com/Databases/MS_Access/Q_21669408.html
but then this thread contradicts what Pete said  http://www.experts-exchange.com/Databases/MS_Access/Q_10021181.html

I tried renaming my .mdb to .mdz to see if that would make a difference, alas it didnt.

Sorry mate, not finding much to help you out here
0
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
Patrick MatthewsAuthor Commented:
rockiroads,

Thanks for that.  Yes, I did know about the directory to find the mdz files in.  Double :)

According to some past EE questions, it is not really possible to create a mdz file.  One alternative I've thought
of is to create an add-in file, have the add-in file store the standard objects, and then have the add-in create a
new mdb file and use TransferDatabase to export the objects to the new mdb.

I was kind of hoping there'd be a better way, though :)

Regards,

Patrick
0
 
Patrick MatthewsAuthor Commented:
rockiroads,

Sorry, our posts crossed in the ether :)

I have the Litwin et al references (Desktop and Enterprise) but somehow missed that chapter.  I shall go take a look
now...  Thanks!

Regards,

Patrick
0
 
rockiroadsCommented:
Alright, good luck
I dont have a copy of that so I cant try it out
0
 
Patrick MatthewsAuthor Commented:
rockiroads,

OK, I found what looks like the material in the Desktop version, haven't checked Enterprise yet.  I'm not terribly
encouraged by what I see, though :(

Thanks for your help.  I will leave this open a bit longer to see if others have some comments...

Regards,

Patrick
0
 
rockiroadsCommented:
Can u drop any pointers on what it says, the basics involved? I can see if I can try create one
0
 
dannywarehamConnect With a Mentor Commented:
I have no idea how to create the mdz files, either!

However, if you create a database with tables and relationships in, you can import to a new database and teh relationships are maintained.

Also, if you create a form with some controls formatted (colours/fonts etc) and save it, you can then go into Tools, Options, Forms/Reports replace "Normal" with that form name.

This makes all future forms/reports in that database match the formatting...

Slightly off what you're after, but worth knowing nonetheless

:-)
0
 
puppydogbuddyConnect With a Mentor Commented:
Patrick,
see this link for a free survey mdb, and note how the mdb is packaged to be used over the internet.  This is not the template that you envisioned, but it is free and might be a way to quickstart your own, or might be a viable alternative as is.  I have seen links to free survey software that is broadcast via ms outlook instead of asp, but do not have it handy.  If you are interested, let me know.

            http://www.smartwebby.com/web_products/flash_survey/AccessInstallation.asp
0
 
puppydogbuddyCommented:
Rocki/Patrick/Danny
re: mdz files  ...see this link

http://www.experts-exchange.com/Databases/MS_Access/Q_21669408.html
0
 
dannywarehamCommented:
That's a bit poo....
:-(
0
 
rockiroadsCommented:
PDB, already seen! it was in my 2nd post :)
but all is not a loss - see my 2nd post
0
 
puppydogbuddyCommented:
Rocki,
 Sorry! I missed that one.....but I found a link for you:

        http://www.vb123.com/toolshed/00_Docs/buildwizards.htm

Patrick:
    see this link for a commericial survey wizard for $99

           http://www.4tops.com/summary.htm
0
 
rockiroadsCommented:
thanks, checking out that link now
0
 
Mike EghtebasDatabase and Application DeveloperCommented:
Hi Patrick,

Rename your MyTemplate.mdb file as MyTemplate.mdz and put it in the template directory.  See if it would work for you.  I tried it; it seems to be working.

Mike
0
 
Mike EghtebasDatabase and Application DeveloperCommented:
I tried to put in General tab but it apears in Access 97 tab (in wizard temp section).  Because it shows up somewhere in wizard section that is good.  I was able to select and open it; however, when saved it gets saved in the same folder as the template (MyTemplate.mdz) as MyTemplate1.mdz.

Problems:  
1. It keeps .mdz extension.
2. It doesn't prompt for a new file name.

Mike
0
 
Mike EghtebasDatabase and Application DeveloperCommented:
so, if we had

MyTemplate.mdz   and MyTemplate.mdb in the template folder and
MyTemplate.mdz, at its startup, has code to save MyTemplate.mdb as
a new name (the code in MyTemplate.mdz starup can prompt the user
for the new location and new file name).

After saving MyNewFile.mdb (which is a copy of MyTemplate.mdb at a new
location, MyTemplate.mdz could quit automatically leaving MyNewFile.mdb
open for the user to work on it.

Mike
file with code to copy
0
 
Mike EghtebasDatabase and Application DeveloperCommented:
please ignor  ...file with code to copy.
0
 
Patrick MatthewsAuthor Commented:
Thanks for your help, everyone!

The Access Developer's Handbook has a chapter on Wizard creation.  It looks more difficult than I'd have liked,
especially as it involves messing with my users' Registry keys to make the Wizard work properly (and because
it involves some arcane function calls).

If I decide to push forward, I will probably do something similar to what stevbe suggests, making an Access
add-in that will create a copy of a mdb file and open the copy in a new instance of Access.

Cheers,

Patrick
0
 
rockiroadsCommented:
Good luck m8
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.