Discussion Locked

Compiling Access 2000 Application

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I want to compile my Database in Access to it is an application. When it is compiled I only want the forms I have developed to show. I do not want the user to have the tools used for design. Is there any way to compile a Database so it has the look and feel, as well as the security of an application? I do not want to use the Access security options. I have desgined a log in screen and other screens to navigate through the database. I only want the user to have these screens available.

Please advise,

Rob

4 replies

by roc180

You can accomplish what you want with a little programming. There are one of 2 ways to go, if you want to create an app that you can debug from a users machine I would suggest locking the app with the standard DB properties (see code). If you wantto create a more secured app create an MDE file, and to keep people from looking at the underbelly make sure to lock it up using the below code. What I usually do is create an MDE file where I have an AutoExec macro (if you name it autoexec it automatically runs when the DB opens) that opens my splash screen form and then calls the function SetStartupProperties() to lock the MDE. MAKE SURE YOU KEEP AN UNLOCKED COPY OF YOUR MDB. Otherwise if you want to make changes your screwed. The BackDoor function is what I use when I want to unlock the MDB for debugging and design.

My message is too long, I'll paste the code as a comment.

Good Luck

Neal Martinelli

by roc180

Function BackDoor()
ChangeProperty "AllowFullMenus", dbBoolean, True
ChangeProperty "AllowBreakIntoCode", dbBoolean, True
ChangeProperty "AllowSpecialKeys", dbBoolean, True
ChangeProperty "AllowBypassKey", dbBoolean, True
ChangeProperty "AllowToolbarChanges", dbBoolean, True
End Function

Function SetStartupProperties()
ChangeProperty "StartupShowDBWindow", dbBoolean, False
ChangeProperty "AllowFullMenus", dbBoolean, False
ChangeProperty "AllowBreakIntoCode", dbBoolean, False
ChangeProperty "AllowSpecialKeys", dbBoolean, False
ChangeProperty "AllowBypassKey", dbBoolean, False
ChangeProperty "AllowToolbarChanges", dbBoolean, False
End Function

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

Change_Bye:
Exit Function

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

by ideafixer

You RULE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Thanks

This discussion is closed to new replies.