Developing for Dynamics GP

by David Musgrave (Perth, Australia) and Microsoft Dynamics GP Developer Support Team (Fargo, ND, USA)

VBA - Preventing the User Login Activity window from opening Example

VBA - Preventing the User Login Activity window from opening Example

  • Comments 2

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.

The code for this customisation is also included (but commented out) in the VBA - Preventing Users from logging into multiple companies Example.

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.

Attachment: Prevent User Login Activity from
  • Microsoft Dynamics GP uses concurrent licensing which provides for a maximum number of users logged into

  • This is very good work to prevent users from log in into more than one company

Page 1 of 1 (2 items)
Comments Information


Please only post comments relating to the topic of this page.

If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.

Leave a Comment
  • Please add 7 and 3 and type the answer here:
  • Post