[AccessD] backend application protection

John Bartow john at winhaven.net
Wed Nov 26 16:15:09 CST 2003


Oops, I forgot to mention that I also minimize the Access Window so only the
Pop-up form is showing. That's a lot of code to post though so If you're
interested let me know.

JB

> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John Bartow
> Sent: Wednesday, November 26, 2003 4:05 PM
> To: Access Developers discussion and problem solving
> Subject: RE: [AccessD] backend application protection
>
>
> John:
> What I do is have my standard info screen as the start up form. That form
> has two small transparent command buttons (cmdABKT and cmdABKF) on it in a
> place no one thinks to double click. These allow me to set the
> bypass key on
> or off as I need to. (The database window is hidden on startup of course)
>
> You could just have a security warning form come up too. Heck, you could
> even log the system user name while your at it, maybe even tell them your
> logging it. Have some fun, scare the jeebies out of them!
> :o)
>
> Here's the code I use, if you find any gaping wholes in it or
> something let
> me know.
>
> John B.
>
> Code Start
> --------------------------------------------------
> Private Sub cmdABKT_DblClick(intCancel As Integer)
>    ' Comments   : turns on bypass key option
>    ChangeProperty "AllowBypassKey", dbBoolean, True
> End Sub
>
> Private Sub cmdABKF_DblClick(intCancel As Integer)
>    ' Comments   : turns off bypass key option
>    ChangeProperty "AllowBypassKey", dbBoolean, False
> End Sub
>
> Function ChangeProperty(strPropName As String, varPropType As Variant,
> varPropValue As Variant) As Integer
>    ' Comments   : changes submitted property value
>    ' Parameters : strPropName
>    '              varPropType
>    '              varPropValue -
>    ' Returns    : Integer -
>    Dim dbs As Database
>    Dim prp As Property
>    Dim strMsg As String
>    Dim varReturn As Variant
>    Const conPropNotFoundError As Long = 3270
>    Set dbs = CurrentDb
>    On Error GoTo Change_Err
>    'set property
>    dbs.Properties(strPropName) = varPropValue
>    'read property
>    Set prp = dbs.Properties(strPropName)
>    strMsg = prp
>    MsgBox strMsg
>    ChangeProperty = True
> Change_Exit:
>    Exit Function
> Change_Err:
>    If Err = conPropNotFoundError Then  ' Property not found.
>       Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
>       dbs.Properties.Append prp
>       Resume Next
>    Else
>       ' Unknown error.
>       ChangeProperty = False
>       Resume Change_Exit
>    End If
> End Function
> --------------------------------------------------
> Code End
>
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>




More information about the AccessD mailing list