Re: Disable shift key
From: Franca (Franca_at_discussions.microsoft.com)
Date: 12/10/04
- Next message: Scott: "a comment on: cannot secure Access db & deleting .mdw removes secu"
- Previous message: Mark: "Digital Certificate"
- In reply to: Rick Brandt: "Re: Disable shift key"
- Next in thread: Rick Brandt: "Re: Disable shift key"
- Reply: Rick Brandt: "Re: Disable shift key"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Dec 2004 13:05:03 -0800
I don't understand where this code goes? I know I have to do this in the
.mde database but how do you add code when you aren't allowed to modify or
add code? Do you open the MS visual editor and add it there?
Confused..
"Rick Brandt" wrote:
> "Franca" <Franca@discussions.microsoft.com> wrote in message
> news:B2DE3346-CD66-4330-8EC7-5880FE34A4DD@microsoft.com...
> >
> > What code do you use and how do I go about doing this.
> >
> > I'm new to access so could you be as descriptive as possible.
>
> '************************************************-
> Private Sub DisableByPassButton_Click()
>
> On Error GoTo ErrHandler
>
> Dim db As Database
> Dim prp As Property
>
> Set db = CurrentDb
> db.Properties("AllowBypassKey") = False
> Set db = Nothing
>
> Egress:
> On Error Resume Next
> Set db = Nothing
> Set prp = Nothing
> Exit Sub
>
> ErrHandler:
> MsgBox Err.Number
> If Err.Number = 3270 Then ' Property not found.
> Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, False)
> db.Properties.Append prp
> Resume Next
> Else
> MsgBox Err.Description
> Resume Egress
> End If
> End Sub
>
> '***********************************************
> Private Sub EnableByPassButton_Click()
>
> On Error GoTo ErrHandler
>
> Dim db As Database
> Dim prp As Property
>
> Set db = CurrentDb
> db.Properties("AllowBypassKey") = True
> Set db = Nothing
>
> Egress:
> On Error Resume Next
> Set db = Nothing
> Set prp = Nothing
> Exit Sub
>
> ErrHandler:
> MsgBox Err.Number
> If Err.Number = 3270 Then ' Property not found.
> Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, True)
> db.Properties.Append prp
> Resume Next
> Else
> MsgBox Err.Description
> Resume Egress
> End If
> End Sub
> '*************************************************
>
> --
> I don't check the Email account attached
> to this message. Send instead to...
> RBrandt at Hunter dot com
>
>
>
>
- Next message: Scott: "a comment on: cannot secure Access db & deleting .mdw removes secu"
- Previous message: Mark: "Digital Certificate"
- In reply to: Rick Brandt: "Re: Disable shift key"
- Next in thread: Rick Brandt: "Re: Disable shift key"
- Reply: Rick Brandt: "Re: Disable shift key"
- Messages sorted by: [ date ] [ thread ]