Ways to convert a .mdb to a .exe

Hello all,

I have a database in Access .mdb and would like to convert it to a .exe

1 possible way would be to use Office Developer but it seems like Microsoft has discontinued the product? I can't find it anywhere and even if i do, i'm not gonna fork out that sum of money just for converting the database.

Does anyone else have any other ideas to convert the .mdb to an .exe?

Who is Participating?
jadedataConnect With a Mentor MS Access Systems CreatorCommented:
This can not be done.  To have an .exe you must write your application in a compileable language.
The MS Office Developer did not supply the means to create a exe from an mdb, only to be able to build a deployable that would set up the app according to specs.
xhenkaiiAuthor Commented:
Hi jade,

I understand what u mean. What i actually need to do is to create a deployable where only the GUI is accessible to the user.
I cannot create a MDE file. It seem to require the database to be access 02 and up. Does it?

>> I cannot create a MDE file. It seem to require the database to be access 02 and up. Does it?

97 you can create an MDE (Tools - Db utilities - Create MDE), did it about 2 mins ago..

Cant say for sure about older versions

To make an exe you'll need to use a VB / C (or the like) front end
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

xhenkaiiAuthor Commented:
I see... funny y i cant my MDE option is grey out...
Thanks for the info anyway pple.
you may also try this:

If the option to create MDE is greyed out you need to open the MDB file in exclusive mode. Go to file-open, click on the drop down box and choose open exclusive

xhenkaiiAuthor Commented:
well found this on a site.hope its useful to people reading this thread.
 credits to sean who is the administrator there

Let me start with the basics of a stand-alone, runtime Access application. As we all know mdb files require that Access be installed on a computer to run. MDB files run in development mode by default but you can open them in runtime mode by creating a shortcut to open the database and adding the /runtime switch. The shortcut command line includes these elements: <path to msaccess.exe> <switches> <switch parameters(if any)> <path to database file>
So to open a database in runtime mode create a shortcut with this in its Target field:
"C:\Program Files\Microsoft Office\Office\msaccess.exe" /runtime "C:\My Documents\mydatabase.mdb"
The runtime mode simulates how a database will work if used in conjunction with the Access Runtime version. The Access Runtime version is a freely dsitributable version of Access that allows you to open a database file but not to modify it. You must purchase a royalty free runtime license from Microsoft in order to legally distribute the runtime version of Access. This license is included with the Developers versions of Office.
The runtime version of Access allows you to make your Access database appear to be a completely independant application. Users wont even know that your software is an access database unless they dig into the installation directory and see the mdb/mde files.
Now comes the tricky part, Installation
The Office Developers Edition comes with the Access Setup Wizard (dont know what its called in OfficeXP) that is designed to create an executable file that installs your database, the runtime version of access and all required support files. Thats great in theory, but the MS Setup Wizard is a piece of junk. We wasted months and thousands of dollars working with it only to find out that even after all the bugs were fixed it interfered with other Access applications. So we scrapped it an found a company called SageKey software that sells an Access Runtime install script for use with Wise Install Builder or InstallShield (the 2 most commonly used install applications). All you have to do is install Office Developers Edition, Wise InstallBuilder (or InstallShield) the script from SageKey, then you can edit the script as you like (very simple script language and it is commented to tell you where to edit). then click the compile button in Wise and it creates a single EXE file. This is also a great advantage over the MS Install Apps becasue they create an exe file but it must be accompanied by about 30 other files. Wise creates just one file. That makes it easy to let customers download your app or a demo of your app.
Tips and Tricks
Actually I lied when I said that the Install App was the tricky part.. Creating an Access database that can be widely distributed is the tricky part. You have to take your error handling (idiot proofing) to a whole new level. But here are some tips and tricks you can use to develop your app.
1) Create a Bitmap image for use as a splash screen, name it the same name as the main database file and make sure it installs in the same directory as the main database file. Access will display your splash screen instead of the Access splash screen when the app starts.
2) Download Icon Easel or some other Icon creation software and create an ICO file for your App. It is a dead giveaway when the Access icon is displayed in the Title bar.
3) Create a Help File. The Help software that comes with Office Developers Edition kinda sucks, so I bought an inexpensive app called WinHelpDesign. You can create context sensitive Help files that associate forms, reports or even specific controls with a Help Topic. When the User asks for help, it will take them directly to the topic you associated to the form/report/etc.. WinHelpDesign will also export your Help file to HTML so you can post it on a website.
4) Make your database file MDEs. Unless you are selling the app as opensource where you allow customers to make changes, it is advisable to only distribute MDE files. That way customers cannot not accidentally modify anything (even if they open the file in the full version of access) and they cannot see your source code (or steal any of it).
5) Create a separate security file. The SageKey script is designed to do this already. Create a copy of the default system.mdw file and customize it if you want your users to be able to implement security. One of the (many) limitations in the runtime version is that users do NOT have access to the security settings. So, if you want to allow users to setup security, you will have to build an interface. (Im working on one now). You can predefine user groups in the new MDW file. That way all the user has to do is create a new user, assign a group and give it a password. Its very messy if they have to get into object level permissions.
Access security is a topic all by itself so Ill leave it at that
6) Add Management tools.
6.1)If you are going to enable the ability to install the app on a network, then you need to add some management tools to your app. For one, users need to have the ability to relink thier tables to the data file on the network. There is code in Northwinds that shows how to do this. It is a lot of code, most of it is used to generate a Browse window. So if you can think of a way to do this without using a browse window, it will be alot easier..
6.2) The SageKey script can install Repair and Compact shortcuts. I actually prefer to set a timer that will set the Compact on Close option every month. But you at least need a Repair shorcut for your main app file. You can create a button to Repair and Compact the data file (if you are doing a network enabled app).
6.3) Backup, Archive, Import Archive data options are always nice to have..not very difficult to add. And the ability to install an update. An easy way to do this is to just replace the front-end file. Of course you cant do that if it stores any important information so you would have to create routine that transfers database objects from an update mdb file..

I know thats alot to think about, my apps have evolved over a long period of time (based on user requests, etc..) but the work is well worth it.
You can still "lock" the db down so that the users cannot get into the db objects (forms, tables, modules, etc...).

Create a new module and paste this code:

Sub SetStartupProperties()
    ChangeProperty "StartupForm", dbText, "YourFormHere"
    ChangeProperty "StartupShowDBWindow", dbBoolean, False
    ChangeProperty "StartupShowStatusBar", dbBoolean, False
    ChangeProperty "AllowBuiltinToolbars", dbBoolean, False
    ChangeProperty "AllowFullMenus", dbBoolean, False
    ChangeProperty "AllowBreakIntoCode", dbBoolean, False
    ChangeProperty "AllowSpecialKeys", dbBoolean, False
    ChangeProperty "AllowBypassKey", dbBoolean, False
    ChangeProperty "AppTitle", dbText, "Application Title Here vs1.2"
End Sub

Public Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
    Dim dbs As Database, prp As Property
    Const conPropNotFoundError = 3270

    Set dbs = CurrentDb
    On Error GoTo Change_Err
    dbs.Properties(strPropName) = varPropValue
    ChangeProperty = True

    Exit Function

    If ERR = conPropNotFoundError Then  ' Property not found.
        Set prp = dbs.CreateProperty(strPropName, _
            varPropType, varPropValue)
        dbs.Properties.Append prp
        Resume Next
        ' Unknown error.
        ChangeProperty = False
        Resume Change_Bye
    End If
End Function

The key line of code here is this

    ChangeProperty "AllowBypassKey", dbBoolean, False

This turns off the shift key.  It's a good idea to create yourself a back door by changing the line to this:

    ChangeProperty "AllowBypassKey", dbBoolean, True

You can put that on the Double Click event of a label.  You should try this out on a COPY of your database first.

This code does not prevent anyone from creating a new database and then importing all the objects from your database.

oh yeah, my previous post is based on this comment

>>What i actually need to do is to create a deployable where only the GUI is accessible to the user
xhenkaiiAuthor Commented:

I've tried your code but it throws me a type mismatch error.
The error happens on this line:
dbs.Properties(strPropName) = varPropValue

and it throws the "type mismatch" on  
Set prp = dbs.CreateProperty(strPropName, _
            varPropType, varPropValue)

Just to retrace my steps. I created a module and copy paste ur sub and the public function into it. I've insert ChangeProperty "AllowBypassKey", dbBoolean, False into the form_load() of the switchboard. Right?

If I can just add my two cents worth...

First to create BULLETPROOF runtime installation of Access apps using the Access Runtime Modules then look into buying preconfigured scripts from SageKey.com.  In order to do this legally you will need to be licensed for Office Developer Edition (Which I KNOW was available in all version of access from 97 to 2002.) and Wise Installation System ver 9.

Office Developer comes with some deployment options but they are not bulletproof.

If all you want to do is lock down the user interface (without using an MDE) you can download some rather chintzy free tools from my website at www.accesswizards.com/downloads.  (Hopefully you won't regard this as promotion since I make no money from the tools and they are not supporte).


Seth B Spearman


you only need to run the code once.  After you have pasted the code into the new module (and saved it), place your cursor anywhere within the sub wrappers and press F5.  The next time you open the database, it should be locked down.  One caveat to this:  anyone can still create a new database and import all of the objects in your "locked down" db into the "new" db.

Now, for the error.  What does varPropValue contain and is it the right type for the corresponding varPropType?

I'd love to see your site but I can't get to it.  Server problems or could it be on my end?

Got the URL wrong.  It should have been:


The web site is old (I am doing a new one now) but that should work for you.

I found an url in which MSAccess 97 RunTime was incorporated.
Just download the zip file and install the 2 items!!!, otherwise MSAcces 97 runtime will not be installed!
Select the url:
Download Data Entry Programs Include MSAccess Runtime Version (12MB) )
For extra Info:
Remember, You have to install both items. Once installed you can delete the database that is in it and copy your Access mdb in it.
If you want to download the Runtime for Access2000...[StreetValue is Free ;)]
Here is the link,.. and it works Fantastic!


Finally, there is an extra securitypatch You have to install... KB827431


Last but not least...

Access 2002 Runtime Version.. Included in following Demo Pack

Office XP Service Pack 3 (SP3) for Access 2002 Runtime
regarding locking down the database, have try this.
go to tools/startUp/ then unmark the "display database window option"

also, I udnerstand you mihgt have to use the databse spliter. this creates a back-end a new database where all the table objects are stored along with the data. it then creates a front-end (this is the part the the users can see) here the query, form and reports objects are stored.

the spliter also links the front-end to the back end.
( moved my back end to the SQL server and the front end is an .mde file in a file server, works great!!)

you can then create the .mde

if the database is open the .mde option will be gryeded out. to create the .mde the database has to be closed. open access but do not call the database. Also if the database is a different version that the version of MS Access in your system the .mde option will be grayed out. both MS access and the database must have the same version.
you might want to consider converting your databse before starting any of this work.

hope it helps.
If you want to download the Runtime for Access2000...[StreetValue is Free ;)]
Here is the link,.. and it works Fantastic!

Thoug I consider the idea of downloading this demo and distributing it with my .mde really exciting,I think is not legal. So, If you will distribute a pirate version of your file, it will be as illegal as if you installing a pirate Office XP copy.
After downloading ART2kMIN.exe and extracting 377 files, I was able to run a test .MDE file on a non-MSOffice system via the commandline.  After un-installing MSAccess Runtime and later re-installing on the same machine, I then got a "MSAccess is not licensed for usage on this PC" message.  Any ideas to resolve this ?
Does anyone found the way that convert .mde to .exe file?

Comment from lallentx
Date: 05/19/2004 06:54AM PDT
regarding locking down the database, have try this.
go to tools/startUp/ then unmark the "display database window option"
I made this. So how can I re gain My menus?
I am using the mde compiler utility to convert my mde to exe

Found here.. www.mdecompiler.com

Hope this information can be useful
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.