Another way to solve it would be to put code in QuerySave, if you don’t need the value to show up as negative until after the document is saved.Only relevant code below. Also, don’t use variable/field names like AdjType_1, etc… Just a recommendation.
Dim quantity as String
Dim negative as Boolean
'*** Get quantity and make sure it is numeric
quantity = uidoc.FieldGetText(“Quantity”)
If IsNumeric(quantity) = False Then
MsgBox “Quantity is not a number”
Continue = False
Exit Sub
End If
'*** Check if negative or positive
If uidoc.FieldGetText(“Type”)=“Neg” Then
negative = True
Else
negative = False
End If
'*** Convert to negative number if Type field is “Neg”
Your input translation code is fine, but only if it only runs once. What you need to do is make sure that you don’t keep running it every time the form recalculates.The simplest fix is to change the second line to check that the number is not already negative, so that it reads like this: