Prevent Change Of User Date

Microsoft Dynamics GPFred Webb posted a question on the Dynamics GP Community Forum asking if it was possible to prevent the User Date being changed in Dynamics GP 2010.

One response was to use Field Level Security which would work but seems a little excessive. I had a think on alternatives and, because we’re dealing with GP 2010, the one I came up with was to prevent the User Date window being opened by using a little VBA.

The package for Microsoft Dynamics GP 2010, which also works for Microsoft Dynamics GP 2013, can be downloaded at the bottom of the post.

The VBA I used was:


Private Sub Window_BeforeActivate()
   Me.Close
End Sub

Private Sub Window_BeforeOpen(OpenVisible As Boolean)
   Me.Hide
End Sub

Me.Hide causes the UserDate window to be hidden from the user as it starts to open, and Me.Close forces it to close.

I could have put both the Me.Close and Me.Hide in the sub Window_BeforeOpen, but I found the main GP window didn’t get focus back. By splitting the Me.Close into Window_BeforeActivate focus was returned to GP when the UserDate window was closed.

The downside of using VBA asa solution is that it will not work with the Microsoft Dynamics GP 2013 Web Client, although it will work with the standard 2013 client.

[wpdm_file id=5]

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Looking for support or consultancy with Microsoft Dynamics GP?

I no longer work with Microsoft Dynamics GP, but the last company I worked for was ISC Software in the UK; if you’re looking for support or consultancy services with Microsoft Dynamics GP you can contact them here.

7 thoughts on “Prevent Change Of User Date

  1. Vaidy Mohan says:

    Wouldn’t it be a simple solution to just remove access to this window for normal users, by using standard Security Task setup? When a user try to open User Date window and read the message “You do not security privileges to open this window…..”, I am sure that would send him/her a loud message (that he/she is NOT suppose to change the User Date at all).

    1. Ian Grieve says:

      Seems I’ve been doing too much with with modified windows recently so everything started to look like a nail (when all you have is a hammer etc.).

      As you say, altering the security would do exactly the required action.

Leave a Reply

Your email address will not be published. Required fields are marked *