GooGoocluster
Technical User
Refered from this thread: thread705-403154
My CODE:
I Know the error handler is the same as above, I had to take it out to see what error I was getting.
Its error Run time 91: Object Varriable or With block not set.
I was able to get the help files version to work with a MDB. but it wont work with my .adp
My version is 2002 SP3
My CODE:
Code:
Function DisableShiftKey()
Dim dbs As Object
Dim prp As Object
Const PROPERTY_NOT_FOUND As Integer = 3270
On Error GoTo ErrorHandler
Set dbs = Application.CurrentDb
' Try to set the property. If it fails, the property does not exist.
CurrentProject.Properties.Add "AllowByPassKey", False
ExitLine:
dbs.Close
Set dbs = Nothing
Set prp = Nothing
Exit Function
ErrorHandler:
MsgBox Err.Number & " " & Err.Description
'If Err.Number = PROPERTY_NOT_FOUND Then
' Create the new property.
' CurrentProject.Properties.Add "AllowBypassKey", False
' Resume Next
' Else
' Resume ExitLine
' End If
End Function
I Know the error handler is the same as above, I had to take it out to see what error I was getting.
Its error Run time 91: Object Varriable or With block not set.
I was able to get the help files version to work with a MDB. but it wont work with my .adp
My version is 2002 SP3