RE: Dynamics vba code not always running for some users
I believe we did it within the project GP- > Tools -> Customize -> VB Editor
We were working on a customization in the sales form. We modified the connection code so appropriate permissions are sought for each user before data is accessed.
Not sure whether or not your issue is security related.
Dim objCont As New ADODB.Connection
Dim SqlQ As New ADODB.Command
Dim TableIsERS As New ADODB.Recordset
Set objCont = UserInfoGet.CreateADOConnection()
objCont.CursorLocation = adUseClient
objCont.DefaultDatabase = UserInfoGet.IntercompanyID
If Trim(SalesTransactionEntryDetail.ItemNumber) = "" Then
Exit Sub
Else
CatNo = Trim(SalesTransactionEntryDetail.ItemNumber)
SqlQ.ActiveConnection = objCont
SqlQ.CommandText = adCmdText