Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disabling the shift key

Status
Not open for further replies.

eloise

Programmer
Jan 31, 2002
20
0
0
US
Thanks for getting back to me regarding the problem disabling the shift key from the user. I have tried out all suggestions but nothing seems to work. This includes looking at the FAQ's. The problem is i have to program this functionality using the AccessObjectProperties and I am not sure how to use this. Ihave to use AccessObjectProperties as i am working with Access XP and SQL Server Database.

I'm not sure if I'm supposed to call the database object, the property object etc... Please see the example below.

Sub SetBypassProperty()
Const DB_Boolean As Long = 1
ChangeProperty "AllowBypassKey", DB_Boolean, False
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



Please help thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top