PC Review


Reply
Thread Tools Rate Thread

Disable AllowByPass Using ADO

 
 
Lynn
Guest
Posts: n/a
 
      10th Nov 2003
Does anyone have the code to disable the shift key using
ADO. I can find tons of examples using DAO, but need to
do this in ADO.

thanks
 
Reply With Quote
 
 
 
 
Dev Ashish
Guest
Posts: n/a
 
      10th Nov 2003
"Lynn" <(E-Mail Removed)> wrote in news:097301c3a7c9
$1fa64000$(E-Mail Removed):

>
> Does anyone have the code to disable the shift key using
> ADO. I can find tons of examples using DAO, but need to
> do this in ADO.
>


You want this for an ADP, correct? Using CurrentProject will not work for
MDB where you must use the Access.Properties collection. In ADP, you have
to use CurrentProject.AccessObjectProperties (as noted in help for
AllowBypassKey).

' *** Code Start ***
Sub SetAllowBypassKey(value As Boolean)
Call ChangeProperty_ADP("AllowBypassKey", value)
End Sub

Sub CheckAllowBypassKey()
On Error Resume Next
Debug.Print Application.CurrentProject. _
Properties("AllowBypassKey")
End Sub

Sub ChangeProperty_ADP(propertyName As String, _
propertyValue As Variant)
Dim props As AccessObjectProperties
Dim prop As AccessObjectProperty
Dim isPresent As Boolean

Set props = Application.CurrentProject.Properties
For Each prop In props
If (StrComp(prop.Name, propertyName, vbTextCompare) = 0) Then
isPresent = True
Exit For
End If
Next

If (isPresent) Then
props(propertyName).value = propertyValue
Else
props.Add propertyName, propertyValue
End If
End Sub
' *** Code End ***

-- Dev
 
Reply With Quote
 
Lynn
Guest
Posts: n/a
 
      12th Nov 2003
Thanks for the code, but can you tell me how you are
calling it.

>-----Original Message-----
>"Lynn" <(E-Mail Removed)> wrote in

news:097301c3a7c9
>$1fa64000$(E-Mail Removed):
>
>>
>> Does anyone have the code to disable the shift key

using
>> ADO. I can find tons of examples using DAO, but need

to
>> do this in ADO.
>>

>
>You want this for an ADP, correct? Using CurrentProject

will not work for
>MDB where you must use the Access.Properties collection.

In ADP, you have
>to use CurrentProject.AccessObjectProperties (as noted in

help for
>AllowBypassKey).
>
>' *** Code Start ***
>Sub SetAllowBypassKey(value As Boolean)
> Call ChangeProperty_ADP("AllowBypassKey", value)
>End Sub
>
>Sub CheckAllowBypassKey()
> On Error Resume Next
> Debug.Print Application.CurrentProject. _
> Properties("AllowBypassKey")
>End Sub
>
>Sub ChangeProperty_ADP(propertyName As String, _
> propertyValue As

Variant)
>Dim props As AccessObjectProperties
>Dim prop As AccessObjectProperty
>Dim isPresent As Boolean
>
> Set props = Application.CurrentProject.Properties
> For Each prop In props
> If (StrComp(prop.Name, propertyName,

vbTextCompare) = 0) Then
> isPresent = True
> Exit For
> End If
> Next
>
> If (isPresent) Then
> props(propertyName).value = propertyValue
> Else
> props.Add propertyName, propertyValue
> End If
>End Sub
>' *** Code End ***
>
> -- Dev
>.
>

 
Reply With Quote
 
Dev Ashish
Guest
Posts: n/a
 
      13th Nov 2003
"Lynn" <(E-Mail Removed)> wrote in news:002601c3a940
$cf877cf0$(E-Mail Removed):

> Thanks for the code, but can you tell me how you are
> calling it.



SetAllowBypassKey true
or
SetAllowBypassKey false

Or did I misinterpret you?

-- Dev
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Performing something Like Disable / changing the layout of Disable esakal Microsoft Dot NET 0 6th Sep 2006 06:01 PM
Disable Password Prompt/Disable User Lock =?Utf-8?B?SnVsY28=?= Windows XP General 2 25th Aug 2006 03:05 AM
AllowBypass Key =?Utf-8?B?a2Vycnk=?= Microsoft Access VBA Modules 6 24th Mar 2006 05:15 PM
Skin pocket pc, disable hardware buttons, disable start button Tizio Incognito Microsoft Dot NET Compact Framework 1 3rd Feb 2005 10:13 AM
Activated or deactivated allowbypass key on secured DB... Manova Microsoft Access Security 0 24th Apr 2004 06:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:09 PM.