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 in Access Project

Status
Not open for further replies.

eloise

Programmer
Jan 31, 2002
20
0
0
US
I am having a serious problem with trying to disable the shift key in
Access Project. I tried using the help index and it stated that I had
to program it using AccessObjectProperties but I not really sure how
to do this. Please Help Me.... Thanks in Advance
 
Check out the FAQ's. There is some code and instructions on how to set up transparent secret buttons which turn the shif key on and off.

Rob
 
Step by step instructions in thread705-349778

Dan
[pipe]
 
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
 
eloise,

Yes, please put the above code in a module in another .mdb and call the .mdb that you want to secure:

Set dbs = DBEngine.Workspaces(0).OpenDatabase("P:\AccessDB\AcessDB.mdb")

And then just run the code from the other DB.

Thanks.

banera@cpchem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top