PC Review


Reply
Thread Tools Rate Thread

Database window security

 
 
=?Utf-8?B?VmVyeSBCYXNpYyBVc2Vy?=
Guest
Posts: n/a
 
      6th Sep 2006
Hello,

Is there any way to require a password before being able to view the
database window. I currently have my database open with a switchboard, but
all the user has to do is hit "F11" to open the database window. If I could
password protect just the database window, I should be secure enough. Thanks
for your time!
--
Thank you for your time!
John
 
Reply With Quote
 
 
 
 
Rick Brandt
Guest
Posts: n/a
 
      6th Sep 2006
Very Basic User wrote:
> Hello,
>
> Is there any way to require a password before being able to view the
> database window. I currently have my database open with a
> switchboard, but all the user has to do is hit "F11" to open the
> database window. If I could password protect just the database
> window, I should be secure enough. Thanks for your time!


In Startup you can disable the F11 key. Uncheck "Use Access Special Keys".
For yourself just hold the shift key while opening the file to bypass the
startup options. Of course some of your users might know about the shift
key.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com




 
Reply With Quote
 
=?Utf-8?B?VmVyeSBCYXNpYyBVc2Vy?=
Guest
Posts: n/a
 
      6th Sep 2006
Thanks Rick, I think this will help! The only reason they know about the F11
was because they all saw me use it in a training session to show how to use
the database, so I'm hoping that none have seen the shift key. I appreciate
your time!
--
Thank you for your time!
John


"Rick Brandt" wrote:

> Very Basic User wrote:
> > Hello,
> >
> > Is there any way to require a password before being able to view the
> > database window. I currently have my database open with a
> > switchboard, but all the user has to do is hit "F11" to open the
> > database window. If I could password protect just the database
> > window, I should be secure enough. Thanks for your time!

>
> In Startup you can disable the F11 key. Uncheck "Use Access Special Keys".
> For yourself just hold the shift key while opening the file to bypass the
> startup options. Of course some of your users might know about the shift
> key.
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>
>
>
>
>

 
Reply With Quote
 
CompGeek78
Guest
Posts: n/a
 
      6th Sep 2006
If you need to make it so that the users can't use the shift key even
if they know about it, you can use this code created by Michael
Kaplan.

' *********** Code Start ***********
'This code was originally written by Michael Kaplan.
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'
'Code Courtesy of
'Michael Kaplan
'
Function ChangePropertyDdl(stPropName As String, _
PropType As DAO.DataTypeEnum, vPropVal As Variant) _
As Boolean
' Uses the DDL argument to create a property
' that only Admins can change.
'
' Current CreateProperty listing in Access help
' is flawed in that anyone who can open the db
' can reset properties, such as AllowBypassKey
'
On Error GoTo ChangePropertyDdl_Err

Dim db As DAO.Database
Dim prp As DAO.Property

Const conPropNotFoundError = 3270

Set db = CurrentDb
' Assuming the current property was created without
' using the DDL argument. Delete it so we can
' recreate it properly
db.Properties.Delete stPropName
Set prp = db.CreateProperty(stPropName, _
PropType, vPropVal, True)
db.Properties.Append prp

' If we made it this far, it worked!
ChangePropertyDdl = True

ChangePropertyDdl_Exit:
Set prp = Nothing
Set db = Nothing
Exit Function

ChangePropertyDdl_Err:
If Err.Number = conPropNotFoundError Then
' We can ignore when the prop does not exist
Resume Next
End If
Resume ChangePropertyDdl_Exit
End Function
' *********** Code End ***********

Paste the above code into a module. Then you can use the following
procedures to disable and enable the shift key for when you need it.

Public Sub DisableShiftKey()
If ChangePropertyDdl("AllowBypassKey", dbBoolean, False) Then
MsgBox "Shift key access disabled."
Else
Msgbox "An error occured."
End If
End Sub

Public Sub EnableShiftKey()
If ChangePropertyDdl("AllowBypassKey", dbBoolean, True) Then
MsgBox "Shift key access enabled."
Else
Msgbox "An error occured."
End If
End Sub

One problem I note in my version of Access 2003. The error number for
property not in collection seems to be 3265 now, not 3270. If you get
the an error occured message, change the line:

Const conPropNotFoundError = 3270
to
Const conPropNotFoundError = 3265

This code will disable the shift key for everyone, including you. Make
sure that you put a button or give your self some way to run the enable
code even if you don't have access to the database window. Here's how
I do it.

On a form in the database, I almost always have some sort of
administration functions. I put two buttons on there, one for
disabling and one for enabling the shift key. If I am using user-level
security, I just restrict access to that form to only admins.
Otherwise, you can write a simple piece of code to force a password
prompt on the two buttons.

Private Sub cmdDisableShift_Click()
If MsgBox("Do you want to disable the shift key?", vbYesNo,
"Confirm") = vbYes Then
If InputBox("Password:", "Restricted") = "1234" Then
DisableShiftKey
Else
MsgBox "Incorrect password."
End If
Else
MsgBox "Shift key access is not disabled."
End If
End Sub

Private Sub cmdEnableShift_Click()
If MsgBox("Do you want to enable the shift key?", vbYesNo,
"Confirm") = vbYes Then
If InputBox("Password:", "Restricted") = "1234" Then
EnableShiftKey
Else
MsgBox "Incorrect password."
End If
Else
MsgBox "Shift key access is not enabled."
End If
End Sub

Just replace 1234 with whatever password you want to use.

Keven

Very Basic User wrote:
> Thanks Rick, I think this will help! The only reason they know about the F11
> was because they all saw me use it in a training session to show how to use
> the database, so I'm hoping that none have seen the shift key. I appreciate
> your time!
> --
> Thank you for your time!
> John
>
>
> "Rick Brandt" wrote:
>
> > Very Basic User wrote:
> > > Hello,
> > >
> > > Is there any way to require a password before being able to view the
> > > database window. I currently have my database open with a
> > > switchboard, but all the user has to do is hit "F11" to open the
> > > database window. If I could password protect just the database
> > > window, I should be secure enough. Thanks for your time!

> >
> > In Startup you can disable the F11 key. Uncheck "Use Access Special Keys".
> > For yourself just hold the shift key while opening the file to bypass the
> > startup options. Of course some of your users might know about the shift
> > key.
> >
> > --
> > Rick Brandt, Microsoft Access MVP
> > Email (as appropriate) to...
> > RBrandt at Hunter dot com
> >
> >
> >
> >
> >


 
Reply With Quote
 
aaron.kempf@gmail.com
Guest
Posts: n/a
 
      7th Sep 2006
MDB is for ****ing babies.
the security doesn't work AT ALL.

Use SQL Server or EAT ****




Very Basic User wrote:
> Hello,
>
> Is there any way to require a password before being able to view the
> database window. I currently have my database open with a switchboard, but
> all the user has to do is hit "F11" to open the database window. If I could
> password protect just the database window, I should be secure enough. Thanks
> for your time!
> --
> Thank you for your time!
> John


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Database Window and unable to change security settings Gntlhnds Microsoft Access Security 2 23rd Apr 2010 06:20 AM
Disabling the database window w/o using access security Jimmy Microsoft Access VBA Modules 2 27th Jun 2004 04:47 AM
Database Window security PeterK Microsoft Access Security 1 27th Jan 2004 08:58 PM
Re: UNHIDE Database window AFTER USING User Level Security Lynn Trapp Microsoft Access Security 0 27th Jun 2003 01:34 PM
UNHIDE Database window AFTER USING User Level Security SimonM Microsoft Access Security 0 27th Jun 2003 11:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:03 PM.