VBA – Preventing the User Login Activity window from opening Example

David Meego - Click for blog homepageThis is a reposting of an article I originally wrote on my Developing for Dynamics GP blog.

From Microsoft Business Solutions – Great Plains v8.00 onwards the system has included a User Login Activity window which can be used by a user to remove their own login record after it has been left stranded by an abnormal termination of the application (read “crash”).

Some system administrators would prefer for this function to be disabled so they can monitor the number of times users are stranded and then remove them via the normal Tools >> Setup >> System >> User Activity method.

NOTE: If you just remove the record from the ACTIVITY table using SQL, this will not cleanup other batch and transaction activity records for the user.

This very simple VBA example uses the Window_BeforeModalDialog and Window_AfterModalDialog to automatically say “No” to the original dialog and then display a new message to display why the login failed.

Example code for v8.0, v9.0 & v10.0 is attached at the bottom of the article.

Please see the “Installation Instructions.txt” file in each version’s archive for more information.

Prevent User Login Activity from Opening.zip

This article was originally posted on the Developing for Dynamics GP Blog and has been reposted on http://www.winthropdc.com/blog.

2 thoughts on “VBA – Preventing the User Login Activity window from opening Example

Leave a Reply