Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 26th, 2007, 05:39 AM
Friend of Wrox
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default Security Issue

Hi All
I have set up a user name and password for users to logon to a database. How do I prevent the user's from entering the database by holding the shift and open keys on the keyboard and letting me have access to the database in design view.


Brendan Bartley
Brendan Bartley
Old April 26th, 2007, 09:37 AM
Authorized User
Join Date: Apr 2007
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts


Check the example here:


But also you can probably do this:
**Just make sure that you there are quotes around 'AllowBypassKey' like this: ChangePropertyDdl ("AllowBypassKey", DB_Boolean, False).**

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

Set prp = Nothing
Set db = Nothing
Exit Function

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Code Access Security & Role Based Security robzyc C# 6 April 11th, 2008 02:31 AM
A security issue of my new computer language AndrewH Other Programming Languages 0 July 5th, 2007 04:01 PM
java security certificate issue getsreenuk Apache Tomcat 0 March 3rd, 2007 05:49 AM
Security Issue rajuru Beginning PHP 3 December 23rd, 2004 09:35 AM
Security Issue vlado2000 Classic ASP Professional 0 March 5th, 2004 02:26 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.