Security Back End Front End

ccocom

Registered User.
Local time
Today, 08:45
Joined
Nov 15, 2002
Messages
27
I have a backend on our server and a front end running on individual workstations. I have applied the shift enter lock (referred to in these forums and downloaded from Utteraccess.com) on the front ends and made them reasonably bullet proof by customizing menus, turning all forms into modal pop-ups, hiding the database window, and controlling navigation through command button forms. My problem is that I want to lock all end users out of the back end tables while still allowing them to enter/edit data in those tables. I was hoping to accomplish this using Windows network security, but this prevented the end users from moving data to and from the back end via the linked tables. I have searched these forums for posts on "security," "back end," "front end," etc., and am coming to the conclusion that I need to abandon network security in favor of access security. All of my tables and reports in the front end are run through queries, so I was hoping to be able to follow the advice of the following post http://www.access-programmers.co.uk...s=&threadid=40109&highlight=backend+security.
The problem here is that I have already developed the front and back end and am unsure how to go back and follow the instructions given in the post.

I have tried to use the security wiz and have ended up with a database that I can no longer open at all. Fortunately, I am experimenting with security on a copy of the original db. Any ideas on how to proceed?
 
Here's what I would do...
This will atleast protect your db from being opened.

Create a Startup form on your backend database. Do this by going to Tools...StartUp, name it Startupfrm
Add a textbox, name it txtpwd
then add a command button, name it Enter_But
Set the form properties to popup

add this code to the form

Private Sub EnterBut_Click()
If Me.txtpwd = "YourPassword" Then
DoCmd.Close acForm, "Startupfrm", acSaveYes
Else
MsgBox "Nice Try Wise Guy You're Out!!"
DoCmd.Quit
End If

End Sub

Then add this code to disable shift key access:

Sub SetStartupProperties()
ChangeProperty "StartupForm", dbText, "Form1"
ChangeProperty "StartupShowDBWindow", dbBoolean, True
ChangeProperty "StartupShowStatusBar", dbBoolean, False
ChangeProperty "AllowBuiltinToolbars", dbBoolean, False
ChangeProperty "AllowFullMenus", dbBoolean, True
ChangeProperty "AllowBreakIntoCode", dbBoolean, False
ChangeProperty "AllowSpecialKeys", dbBoolean, False
ChangeProperty "AllowBypassKey", dbBoolean, False

End Sub

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:


Save and compile modules and that should be it... now they cant open your backend, and you arent using access security. hope it helps
 

Users who are viewing this thread

Back
Top Bottom