AllowSpecialKeys setting not applying to current log-in
Posted on 2001-07-10
I'm trying to disable users from bringing up the database window unless they are in the Admins group. I used the following code which runs when the startup Switchboard form's On Open event runs:
If UserInGroup("Admins") Then
ChangeProperty "AllowSpecialKeys", DB_Boolean, True
ChangeProperty "AllowSpecialKeys", DB_Boolean, False
It runs and does set the AllowSpecialKeys properties (as observed from the Startup dialog box). Unfortunately, the setting doesn't take effect until the next time the database is opened. So if a Admins person logs in on the same PC after Non-Admins person then the Admins person isn't able to open the database window (and he should be able to). Now if he just quit then the next person to use this PC will be able to bring up the database window no matter what group he is in.
Anyone know how to make the setting apply as soon as the person logs in. I know if I run the compact utility then the AllowSpecialKeys setting takes effect but that will slow down the start up process (and I'm not sure I know how to do it with code).