Page 1 of 1
AllowSpecialKeys
Posted: 13 Nov 2010, 03:17
by JohnH
I have been asked to disable F11 for one group of users, but it seems to me (after some time of experimentation) that any changes to AllowSpecialkeys don't take effect until the next time the database is opened. So my plan of using VBA will never work. Does that seem right? I would need to create a separate Front End for these users.
Re: AllowSpecialKeys
Posted: 13 Nov 2010, 04:26
by JohnH
On further reflection, my previous post does not reflect very clear thinking.
Giving these users a different front end, assumes they always use the same computer(s). In that case, changing AllowSpecialkeys would work, except for the first time. So I now have this code:
Code: Select all
If ((fnIsAdmin() = True) Or (fnIsGroupMember("RealUsers") = True)) Then
If CurrentDb.Properties("AllowSpecialKeys") = False Then
CurrentDb.Properties("AllowSpecialKeys") = True
MsgBox "You need to reopen the database.", vbInformation
DoCmd.Quit
End If
Else
If CurrentDb.Properties("AllowSpecialKeys") = True Then
CurrentDb.Properties("AllowSpecialKeys") = False
MsgBox "You need to reopen the database.", vbInformation
DoCmd.Quit
End If
End If
This creates a further problem. The very people who can't use F11, don't have permission to
Administer the database, so I get this error.
MysysDB.gif
If I give them permission the error goes away. But I don't want to give them that permission.
Re: AllowSpecialKeys
Posted: 13 Nov 2010, 11:04
by HansV
I guess you'll have to instruct the power users to turn off Allow Special Keys before closing the database, if they turned it on.