GUIDO22
Registered User.
- Local time
- Today, 16:03
- Joined
- Nov 2, 2003
- Messages
- 515
Hi All
I have an error that has haunted me for some years now. I have identified the problem I just need a practical way to avoid it. Here goes...
I use a Switchboard panel arrangement from which all forms/reports are displayed. When the Switchboard form loads - first sub called is UpdateLoginInfo() which determines the CurrentUserGroup and sets the value of the nUserGroup var. The Switchboard buttons are given Enabled/Disabled status by way of a value defined in the Switchboard Items table. This flag value is compared to thenUserGroup var to allow/prevent use of that Switchboard panel option. The Switchboard Items table is queried each time the Switchboard panel is refreshed with a new set of buttons. The Switchboard panel remains open throughout the duration of the database session and only closes when the user quits.
My error handling isn't what it should be (I guess), and some of my users get the occasional error that prompts with the Access error message dialog and the End / Debug button options. When the End button is pressed - the application halts and resets(?). However, the Switchboard form is still open, so when the user returns to this form from the error and refreshes pressing one of the Switchboard buttons, when it redisplays the Switchboard panel with its new set of buttons - all button options are Disabled. I have determined that this is becuase the nUserGroup variable has been re-initialised to 0, (presumably when the user selected End from the error msg dialog). I could initialise the nUsergroup variable each time the Switchboard panel refreshes but that seems a bit of a 'fudge'.
Where am I able to trap this generic Access End/Debug error and force the Access application as a whole - to terminate in this situation ?
TIAFAH
Guido
I have an error that has haunted me for some years now. I have identified the problem I just need a practical way to avoid it. Here goes...
I use a Switchboard panel arrangement from which all forms/reports are displayed. When the Switchboard form loads - first sub called is UpdateLoginInfo() which determines the CurrentUserGroup and sets the value of the nUserGroup var. The Switchboard buttons are given Enabled/Disabled status by way of a value defined in the Switchboard Items table. This flag value is compared to thenUserGroup var to allow/prevent use of that Switchboard panel option. The Switchboard Items table is queried each time the Switchboard panel is refreshed with a new set of buttons. The Switchboard panel remains open throughout the duration of the database session and only closes when the user quits.
My error handling isn't what it should be (I guess), and some of my users get the occasional error that prompts with the Access error message dialog and the End / Debug button options. When the End button is pressed - the application halts and resets(?). However, the Switchboard form is still open, so when the user returns to this form from the error and refreshes pressing one of the Switchboard buttons, when it redisplays the Switchboard panel with its new set of buttons - all button options are Disabled. I have determined that this is becuase the nUserGroup variable has been re-initialised to 0, (presumably when the user selected End from the error msg dialog). I could initialise the nUsergroup variable each time the Switchboard panel refreshes but that seems a bit of a 'fudge'.
Where am I able to trap this generic Access End/Debug error and force the Access application as a whole - to terminate in this situation ?
TIAFAH
Guido