Solved

Creating an Access "template"

Posted on 2006-07-23
21
2,085 Views
Last Modified: 2012-05-05
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
0
Comment
Question by:Patrick Matthews
  • 7
  • 4
  • 4
  • +3
21 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 17163046
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
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 125 total points
ID: 17163072
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
 
LVL 92

Author Comment

by:Patrick Matthews
ID: 17163076
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
 
LVL 92

Author Comment

by:Patrick Matthews
ID: 17163081
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
 
LVL 65

Expert Comment

by:rockiroads
ID: 17163101
Alright, good luck
I dont have a copy of that so I cant try it out
0
 
LVL 92

Author Comment

by:Patrick Matthews
ID: 17163113
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
 
LVL 65

Expert Comment

by:rockiroads
ID: 17163132
Can u drop any pointers on what it says, the basics involved? I can see if I can try create one
0
 
LVL 26

Assisted Solution

by:dannywareham
dannywareham earned 125 total points
ID: 17163192
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
 
LVL 38

Assisted Solution

by:puppydogbuddy
puppydogbuddy earned 125 total points
ID: 17163217
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
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 17163271
Rocki/Patrick/Danny
re: mdz files  ...see this link

http://www.experts-exchange.com/Databases/MS_Access/Q_21669408.html
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 26

Expert Comment

by:dannywareham
ID: 17163295
That's a bit poo....
:-(
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17163337
PDB, already seen! it was in my 2nd post :)
but all is not a loss - see my 2nd post
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 17163372
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
 
LVL 65

Expert Comment

by:rockiroads
ID: 17163488
thanks, checking out that link now
0
 
LVL 33

Expert Comment

by:Mike Eghtebas
ID: 17165472
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
 
LVL 33

Expert Comment

by:Mike Eghtebas
ID: 17165503
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
 
LVL 39

Accepted Solution

by:
stevbe earned 125 total points
ID: 17170724
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
 
LVL 33

Expert Comment

by:Mike Eghtebas
ID: 17172078
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
 
LVL 33

Expert Comment

by:Mike Eghtebas
ID: 17172089
please ignor  ...file with code to copy.
0
 
LVL 92

Author Comment

by:Patrick Matthews
ID: 17232656
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
 
LVL 65

Expert Comment

by:rockiroads
ID: 17239448
Good luck m8
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

746 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

11 Experts available now in Live!

Get 1:1 Help Now