473,387 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Two questions relative to security.

In Microsoft's FAQ about ACCESS security, it gives a nice little code
to disable the shiftKey bypass thingy. I am not very good in VB coding
so I am wondering where to put the damn code in order to execute it
correctly. I mean, I know how to attach code to an action (like a
click on a button) but this code need to run even before the DB is
opened, no?

Here is the code:

Function faq_DisableShiftKeyBypass(strDBName as String, fAllow as
Boolean) As Boolean

On Error GoTo errDisableShift

Dim ws As Workspace
Dim db As DATABASE
Dim prop As Property
Const conPropNotFound = 3270

Set ws = DBEngine.Workspaces(0)
Set db = ws.OpenDatabase(strDBName)

db.Properties("AllowByPassKey") = Not fAllow
faq_DisableShiftKeyBypass = fAllow
exitDisableShift:
Exit Function

errDisableShift:
'The AllowBypassKey property is a user-defined
' property of the database that must be created
' before it can be set. This error code will execute
' the first time this function is run in a database.

If Err = conPropNotFound Then
' You must set the fourth DDL parameter to True
' to ensure that only administrators
' can modify it later. If it was created wrongly, then
' delete it and re-create it correctly.
Set prop = db.CreateProperty("AllowByPassKey", _
dbBoolean, False, True)
db.Properties.Append prop
Resume
Else
MsgBox "Function DisableShiftKeyBypass did not complete
successfully."
Faq_DisableShiftKeyBypass = False
GoTo exitDisableShift
End If
End Function
The other thing is that I want to limit my groups in what they can SEE
from the database. Like, I want my average users (groupe name: USERS)
to only be able to see one form, from where they will be provided with
everything they need for work, they won't see the macros, the table
etc.. How can I do that ?
Nov 13 '05 #1
1 1143
John Marble wrote:
In Microsoft's FAQ about ACCESS security, it gives a nice little code
to disable the shiftKey bypass thingy. I am not very good in VB coding
so I am wondering where to put the damn code in order to execute it
correctly. I mean, I know how to attach code to an action (like a
click on a button) but this code need to run even before the DB is
opened, no?


It is one-time code. You run it when you are ready to deploy and then
that's it. Normally this would mean that you create a copy for deployment
purposes and run the code just before giving it to your users. The copy you
keep for further development would never have the code run.

If you were worried about the bypass property ever getting toggled back you
could run it on every startup, but as you state the change always applies to
the *next time* the app is opened.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Marcus | last post by:
Hello, I am having problems with an include statement. I'm setting a session variable flag and then including a file, and in that include file I have a check at the top to make sure that the...
8
by: Phil Coen | last post by:
I have never tried to build a web site to restrict users. Before, I always wanted everyone to be able to get to everything that I put on one of my sites. So now I am trying to write (actually...
0
by: | last post by:
Hi, I have some questions regarding security in .NET. For customers, I have made an application in C#; an exe and some dlls. - to prevent user from using my dlls directly, a good solution...
3
by: craig | last post by:
I am working on my first .NET development project that involves custom role-based security per the project requirements. This lead to a general design issue this week that really caused us some...
116
by: Mike MacSween | last post by:
S**t for brains strikes again! Why did I do that? When I met the clients and at some point they vaguely asked whether eventually would it be possible to have some people who could read the data...
5
by: Paul .V. | last post by:
I have read many long articles in this group about securing my database for distribution. This is the advise I have taken: 1. Hardcoded the purchasing company's name into the program. The...
4
by: Trevor Best | last post by:
Does anyone know of a source of some good exam (pop quiz) type questions on Access? Looking to test candidates in a job interview. Pref a mix of multiple choice and ones that have real answers. ...
3
by: James Simpson | last post by:
Hello, I am currently deploying an ASP .NET based web application via Visual Studio 2005 (so I am using .NET 2.0 technology). The two questions I have are with regards to session state in...
19
by: hansBKK | last post by:
Upfront disclaimer - I am a relative newbie, just starting out learning about PHP, mostly by researching, installing and playing with different scripts. I am looking for a host that will provide...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.