Oopps... Thanks a lot John.

cheers,
George


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of John Viescas
Sent: Tuesday, May 03, 2005 5:57 PM
To: [email protected]
Subject: RE: [ms_access] Set AllowBypassKey Error


George-

Open the VB Editor and choose Options from the Tools menu.  Make sure you
have NOT chosen the option to "Break on All Errors" on the General tab.  You
should normally select "Break in Class Module."

John Viescas, author
"Building Microsoft Access Applications"
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/

> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of George Oro
> Sent: Tuesday, May 03, 2005 8:39 AM
> To: YG Access
> Subject: [ms_access] Set AllowBypassKey Error
>
>
> I'm using the below code to all my apps but how come suddenly
> I'm getting
> this error?
>
> Run-time error '3270':
> Property cannot found.
>
> TIA,
> George
>
>
> --------------------------------------------------------------
> --------------
> ----------------------
> Option Compare Database
> Option Explicit
>
> --------------------------------------------------------------
> --------------
> ----------------------
> Sub SetBypassProperty()
> Const DB_Boolean As Long = 1
>
> ChangeProperty "AllowBypassKey", DB_Boolean, True
>
> End Sub
>
> --------------------------------------------------------------
> --------------
> ----------------------
>
> Function ChangeProperty(strPropName As String, varPropType As Variant,
> varPropValue As Variant) As Integer
>     Dim dbs As Object, prp As Variant
>     Const conPropNotFoundError = 3270
>
>     Set dbs = CurrentDb
>     On Error GoTo Change_Err
>     dbs.Properties(strPropName) = varPropValue
>     ChangeProperty = True
>
> Change_Bye:
>     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_Bye
>     End If
> End Function
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>




Yahoo! Groups Links











 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to