GJT
Registered User.
- Local time
- Today, 20:35
- Joined
- Nov 5, 2002
- Messages
- 116
I am using a switchboard similar to that used in the Northwind sample database.
What I need to do is restrict access to certain buttons on the switchboard. To do this I have a table that lists all switchboard captions, thus the form structure is built 'on-the-fly'. The table also specifies the user access rights by way of an integer value 1,2 or 0 (1 admin / 2 - user / 0 is all access).
When the form is loaded, the code checks the access value for the button and disables/enables accordingly. However, Access reports an error : 2164 - "You can't disable a control while it has the focus" - how can I get around this problem?
What I need to do is restrict access to certain buttons on the switchboard. To do this I have a table that lists all switchboard captions, thus the form structure is built 'on-the-fly'. The table also specifies the user access rights by way of an integer value 1,2 or 0 (1 admin / 2 - user / 0 is all access).
When the form is loaded, the code checks the access value for the button and disables/enables accordingly. However, Access reports an error : 2164 - "You can't disable a control while it has the focus" - how can I get around this problem?