I am trying to add a couple of field and check boxes into the Debtor Item Maintenance window in Dynamics GP. I have managed to get these added and they are working fine including using DUOS to read/write/delete the information stored in these fields for each debtor item.
The issue I am currently having is that when I type a debtor ID or item number that does not exist into their respective fields, I want the VBA code to recognise that an incorrect debtor ID or item number has been entered and therefore not continue with the code.
For instance, in the code below, the sub runs after the debtor ID has been changed and enables the new check boxes. However I don't want it to run if the debtor ID has been flagged as one that doesn't currently exist.
Private Sub DebtorID_AfterUserChanged() ' Check that the DebtorID isn't incorrect ' This would result in GP raising an error box asking ' if the user wants to cancel or add the new Debtor ID ' If this error has been raised, don't run the code below ' Enable the new check boxes NewCheckBox1.Enabled = True NewCheckBox2.Enabled = True End Sub
*This post is locked for comments