Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: The Bypass


Message #1 by "Ahmed Khamis" <Ahmed.Khamis@v...> on Fri, 27 Dec 2002 15:45:04 +0200
 
Good day all,
 
Could any one tell me how can I change the bypass button for my data base.


 
 


***********************************************
The content of this document is classified as Vodafone Egypt S.A.E. 
Confidential and Proprietary Information. The recipient hereby is 
committed to hold in strict confidence the contents of this 
(e-mail, document, information) and not to disclose to any third party 
without the prior written consent of Vodafone Egypt S.A.E. Recipient 
will be held liable for any unauthorized disclosure.
***********************************************


Message #2 by "Wayne Ryan" <wayne.ryan@t...> on Fri, 27 Dec 2002 21:57:32
Ahmed,

http://p2p.wrox.com/archive/access/2002-01/35.asp

Wayne
Message #3 by "Kenny Alligood" <kennyalligood@h...> on Sat, 28 Dec 2002 10:42:43 -0500
Wayne sent you the best method of dealing with the SHIFT key bypass problem but there is another very
important step that needs to be included. You will need to add another sub that will allow you to unlock the DB for maintenance or
whatever. Without that sub you will lock yourself out of the DB forever....

I can send you the code and functionality that works well for my production DB's at work just let me know if you need it...

Kenny

----- Original Message -----
From: Ahmed Khamis
Sent: Friday, December 27, 2002 2:49 PM
To: Access
Subject: [access] The Bypass


Good day all,

Could any one tell me how can I change the bypass button for my data base.






***********************************************
The content of this document is classified as Vodafone Egypt S.A.E.  
Confidential and Proprietary Information. The recipient hereby is  
committed to hold in strict confidence the contents of this  
(e-mail, document, information) and not to disclose to any third party  
without the prior written consent of Vodafone Egypt S.A.E. Recipient  
will be held liable for any unauthorized disclosure.
***********************************************



to unsubscribe send a blank email to Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

Message #4 by "Ahmed Khamis" <Ahmed.Khamis@v...> on Sat, 28 Dec 2002 17:47:08 +0200
Pls if u can


-----Original Message-----
From: Kenny Alligood [mailto:kennyalligood@h...]
Sent: Saturday, December 28, 2002 5:43 PM
To: Access
Subject: [access] Re: The Bypass

Wayne sent you the best method of dealing with the SHIFT key bypass problem
 but there is another very important step that needs to be included. You wi
ll need to add another sub that will allow you to unlock the DB for mainten
ance or whatever. Without that sub you will lock yourself out of the DB for
ever....

I can send you the code and functionality that works well for my production
 DB's at work just let me know if you need it...

Kenny

----- Original Message -----
From: Ahmed Khamis
Sent: Friday, December 27, 2002 2:49 PM
To: Access
Subject: [access] The Bypass


Good day all,

Could any one tell me how can I change the bypass button for my data base.






***********************************************
The content of this document is classified as Vodafone Egypt S.A.E.
Confidential and Proprietary Information. The recipient hereby is
committed to hold in strict confidence the contents of this
(e-mail, document, information) and not to disclose to any third party
without the prior written consent of Vodafone Egypt S.A.E. Recipient
will be held liable for any unauthorized disclosure.
***********************************************



to unsubscribe send a blank email to Get more from the Web.
  FREE MSN Explorer download : http://explorer.msn.com




***********************************************
The content of this document is classified as Vodafone Egypt S.A.E.
Confidential and Proprietary Information. The recipient hereby is
committed to hold in strict confidence the contents of this
(e-mail, document, information) and not to disclose to any third party
without the prior written consent of Vodafone Egypt S.A.E. Recipient
will be held liable for any unauthorized disclosure.
***********************************************

Message #5 by "Kenny Alligood" <kennyalligood@h...> on Sat, 28 Dec 2002 10:48:35 -0500
Not a problem. Give me until tomorrow and I will send it to you.

Kenny

----- Original Message -----
From: Ahmed Khamis
Sent: Saturday, December 28, 2002 10:46 AM
To: Access
Cc: kennyalligood@h...
Subject: [access] Re: The Bypass

Pls if u can


-----Original Message-----
From: Kenny Alligood [mailto:kennyalligood@h...]
Sent: Saturday, December 28, 2002 5:43 PM
To: Access
Subject: [access] Re: The Bypass

Wayne sent you the best method of dealing with the SHIFT key bypass problem but there is another very important step that needs to
be included. You will need to add another sub that will allow you to unlock the DB for maintenance or whatever. Without that sub you
will lock yourself out of the DB forever....

I can send you the code and functionality that works well for my production DB's at work just let me know if you need it...

Kenny

----- Original Message -----
From: Ahmed Khamis
Sent: Friday, December 27, 2002 2:49 PM
To: Access
Subject: [access] The Bypass


Good day all,

Could any one tell me how can I change the bypass button for my data base.






***********************************************
The content of this document is classified as Vodafone Egypt S.A.E.  
Confidential and Proprietary Information. The recipient hereby is  
committed to hold in strict confidence the contents of this  
(e-mail, document, information) and not to disclose to any third party  
without the prior written consent of Vodafone Egypt S.A.E. Recipient  
will be held liable for any unauthorized disclosure.
***********************************************



to unsubscribe send a blank email to Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com




***********************************************
The content of this document is classified as Vodafone Egypt S.A.E.  
Confidential and Proprietary Information. The recipient hereby is  
committed to hold in strict confidence the contents of this  
(e-mail, document, information) and not to disclose to any third party  
without the prior written consent of Vodafone Egypt S.A.E. Recipient  
will be held liable for any unauthorized disclosure.
***********************************************


to unsubscribe send a blank email to Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

Message #6 by "Charlie Goodwin" <cgoodwin@c...> on Sat, 28 Dec 2002 17:37:10 -0500
Kenny,

Is that sub something you could share here?

Charlie





> Wayne sent you the best method of dealing with the SHIFT key bypass probl
em but there is another very important step that needs to be included. You 
will need to add another sub that will allow you to unlock the DB for maint
enance or whatever. Without that sub you will lock yourself out of the DB f
orever....
> 
> I can send you the code and functionality that works well for my producti
on DB's at work just let me know if you need it...
> 
> Kenny
> 
> ----- Original Message -----
> From: Ahmed Khamis
> Sent: Friday, December 27, 2002 2:49 PM
> To: Access
> Subject: [access] The Bypass
> 
> 
> Good day all,
> 
> Could any one tell me how can I change the bypass button for my data base.
> 
> 
> 
> 
> 
> 
> ***********************************************
> The content of this document is classified as Vodafone Egypt S.A.E.
> Confidential and Proprietary Information. The recipient hereby is
> committed to hold in strict confidence the contents of this
> (e-mail, document, information) and not to disclose to any third party
> without the prior written consent of Vodafone Egypt S.A.E. Recipient
> will be held liable for any unauthorized disclosure.
> ***********************************************
> 
> 
> 
> to unsubscribe send a blank email to Get more from the We
b.  FREE MSN Explorer download : http://explorer.msn.com
> 
> 
Message #7 by "Kenny Alligood" <kennyalligood@h...> on Sun, 29 Dec 2002 08:06:20 -0500
Absolutely! I'll send it to you as well.

Kenny

----- Original Message -----
From: Charlie Goodwin
Sent: Saturday, December 28, 2002 5:36 PM
To: Access
Subject: [access] Re: The Bypass

Kenny,

Is that sub something you could share here?

Charlie





> Wayne sent you the best method of dealing with the SHIFT key bypass problem but there is another very important step that needs
to be included. You will need to add another sub that will allow you to unlock the DB for maintenance or whatever. Without that sub
you will lock yourself out of the DB forever....
>  
> I can send you the code and functionality that works well for my production DB's at work just let me know if you need it...
>  
> Kenny
>  
> ----- Original Message -----
> From: Ahmed Khamis
> Sent: Friday, December 27, 2002 2:49 PM
> To: Access
> Subject: [access] The Bypass
>  
>  
> Good day all,
>  
> Could any one tell me how can I change the bypass button for my data base.
>  
>  
>  
>  
>  
>  
> ***********************************************
> The content of this document is classified as Vodafone Egypt S.A.E.
> Confidential and Proprietary Information. The recipient hereby is
> committed to hold in strict confidence the contents of this
> (e-mail, document, information) and not to disclose to any third party
> without the prior written consent of Vodafone Egypt S.A.E. Recipient
> will be held liable for any unauthorized disclosure.
> ***********************************************
>  
>  
>  
> to unsubscribe send a blank email to Get more from the Web.  FREE MSN Explorer download :
http://explorer.msn.com
>  
>  

to unsubscribe send a blank email to Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

Message #8 by "Bob Bedell" <bobbedell15@m...> on Sun, 29 Dec 2002 16:17:15 +0000
Here's a kinda' neat option. What's needed is any method of toggling
the AllowBypassKey property. The following uses an Inputbox and a
Password. Entering a valid password enables the Shift key; entering an
invalid password or no password disables the Shift key.

cmdSetAllowBypassKey_Click() goes behind a command button; SetProperties
goes in a standard module. Replace "TypeYourBypassPasswordHere" with
your password.

Private Sub cmdSetAllowBypassKey_Click()
    On Error GoTo Err_cmdSetAllowBypassKey_Click

    Dim strInput As String
    Dim strMsg As String

    Beep

    strMsg = "Do you want to enable the Bypass Key?" & vbCrLf & vbLf & _
    "Please key the programmer's password to enable the Bypass Key."

    strInput = InputBox(Prompt:=strMsg, Title:="Disable Bypass Key 
Password")
    If strInput = "TypeYourBypassPasswordHere" Then
        SetProperties "AllowBypassKey", dbBoolean, True
        Beep
        MsgBox "The Bypass Key has been enabled." & vbCrLf & vbLf & _
        "The Shift key will allow the users to bypass the startup options " 
& _
        "the next time the database is opened.", _
        vbInformation, "Set Startup Properties"
    Else
        Beep
        SetProperties "AllowBypassKey", dbBoolean, False
        MsgBox "Incorrect ''AllowBypassKey'' Password!" & vbCrLf & vbLf & _
        "The Bypass Key was disabled." & vbCrLf & vbLf & _
        "The Shift key will NOT allow the users to bypass the startup 
options " & _
        "the next time the database is opened.", _
        vbCritical, "Invalid Password"
        Exit Sub
    End If
Exit_cmdSetAllowBypassKey_Click:
    Exit Sub
Err_cmdSetAllowBypassKey_Click:
    MsgBox "cmdSetAllowBypassKey_Click", Err.Number, Err.Description
    Resume Exit_cmdSetAllowBypassKey_Click
End Sub


Public Function SetProperties(strPropName As String, _
    varPropType As Variant, _
    varPropValue As Variant) As Integer

    On Error GoTo Err_SetProperties

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

    Set db = CurrentDb
    db.Properties(strPropName) = varPropValue
    SetProperties = True
    Set db = Nothing

Exit_SetProperties:
    Exit Function

Err_SetProperties:
    If Err = 3270 Then 'Property not found
        Set prp = db.CreateProperty( _
            strPropName, varPropType, varPropValue)
        db.Properties.Append prp
        Resume Next
    Else
        SetProperties = False
        MsgBox "SetProperties", Err.Number, Err.Description
        Resume Exit_SetProperties
    End If
End Function



_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

Message #9 by "Kenny Alligood" <kennyalligood@h...> on Mon, 30 Dec 2002 21:17:40
Sorry this took so long to get to you but something came up yesterday 
where I was unable to send it but here goes.....

Create a module with the following code:

---------------------------------------------------------
Option Compare Database
Option Explicit
---------------------------------------------------------
Function LockDB() As Boolean
On Error GoTo LockDB_Err

Const DB_Text As Long = 10
Const DB_Boolean As Long = 1

' Call ChangeProperty("StartupMenuBar", DB_Text, "MenuBar")
' Call ChangeProperty("StartupShortcutMenuBar", DB_Text, "Your users 
Shortcut Menu Bar")
Call ChangeProperty("StartupShowDBWindow", DB_Boolean, False)
Call ChangeProperty("StartupShowStatusBar", DB_Boolean, False)
Call ChangeProperty("AllowBuiltinToolbars", DB_Boolean, False)
Call ChangeProperty("AllowFullMenus", DB_Boolean, False)
Call ChangeProperty("AllowBreakIntoCode", DB_Boolean, False)
Call ChangeProperty("AllowSpecialKeys", DB_Boolean, False)
Call ChangeProperty("AllowBypassKey", DB_Boolean, False)
Call ChangeProperty("AllowShortcutMenus", DB_Boolean, False)
Call ChangeProperty("AllowToolbarChanges", DB_Boolean, False)

LockDB = True

LockDB_Exit:
Exit Function

LockDB_Err:
MsgBox Err.Description
Resume LockDB_Exit

End Function
--------------------------------------------------------------
Function UnLockDb() As Boolean
On Error GoTo UnLockDb_Err

' Call ChangeProperty("StartupMenuBar", DB_Text, "MenuBar")
' Call ChangeProperty("StartupShortcutMenuBar", DB_Text, "Admins Menu Bar")
Call ChangeProperty("StartUpShowDBWindow", DB_Boolean, True)
Call ChangeProperty("StartupShowStatusBar", DB_Boolean, True)
Call ChangeProperty("AllowBuiltInToolbars", DB_Boolean, True)
Call ChangeProperty("AllowFullMenus", DB_Boolean, True)
Call ChangeProperty("AllowBreakIntoCode", DB_Boolean, True)
Call ChangeProperty("AllowSpecialKeys", DB_Boolean, True)
Call ChangeProperty("AllowBypassKey", DB_Boolean, True)
Call ChangeProperty("AllowToolbarChanges", DB_Boolean, True)
Call ChangeProperty("AllowShortcutMenus", DB_Boolean, True)

UnLockDb = True

UnLockDb_Exit:
Exit Function

UnLockDb_Err:
MsgBox Err.Description
Resume UnLockDb_Exit

End Function
---------------------------------------------------------------
Function ChangeProperty(strProperty As String, varType As Variant, 
varValue As Variant) As Integer
On Error GoTo ChangeProperty_Err

Dim db As Object
Dim prp As Variant
Const PropertyNotfound = 3270

Set db = CurrentDb
On Error GoTo ChangeProperty_Err
db.Properties(strProperty) = varValue
ChangeProperty = True

ChangeProperty_Exit:
On Error Resume Next
Set db = Nothing
Err = 0
On Error GoTo 0
Exit Function

ChangeProperty_Err:
If Err = PropertyNotfound Then
    Set prp = db.CreateProperty(strProperty, varType, varValue)
    db.Properties.Append prp
    Resume Next
Else
    MsgBox Err.Description
End If

End Function
---------------------------------------------------------------

Create an autoexec macro with the action of ?Run Code? and the Function 
Name is ?LockDB?
	(without the quotes)

This will get the DB locked from prying eyes or those that know the SHIFT 
key bypass or F11 bypass. If you left the DB like this you would not be 
able to ever open (unlock) the DB to maintenance or anything else so you 
will need to add a CommandButton (or whatever you choose) that will call 
the UnLockDB function in the module that you created. What I have done is 
tied the function call to a CommandButton that is invisible unless you are 
a specific user in my DB?s ? namely me. My DB?s work on a local security 
system with UserName?s, Passwords, and UserLevels. Since my UserLevel = 
ADM when I sign into the DB the CommandButton becomes Visible and I can 
then unlock the DB. I highly recomment making a backup copy of your DB 
prior to adding this function because if anything goes wrong you will lose 
that DB and have to recreate it. If you need any further help or 
instructions please let me know.

  Return to Index