By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,474 Members | 3,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,474 IT Pros & Developers. It's quick & easy.

Two questions relative to security.

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.