Disable the save function in Inventory Maintenance
Posted:
Wed Mar 13, 2019 2:02 pm
by tonys
Hi,
In Inventory Maintenenance (Vesion 06.05.13) when saving a record, I would like a Message Box stating "Classification Not Set" and the save function disabled if the classification ID is "ZZZZZZZZZZ0000000000"
Want to force operators to pick a classification.
Re: Disable the save function in Inventory Maintenance
Posted:
Wed Mar 13, 2019 2:47 pm
by tonys
Hi, You can ignore this request, I have got it working using the following.
If InventoryObject.ClassificationID = "ZZZZZZZZZZ0000000000" Then
MsgBox "You cannot save until the Classification has been set.", vbCritical + vbOkOnly, "Classification Not Set"
rtnCancel = True
End If
If InventoryObject.Category1ID = "ZZZZZZZZZZ0000000001" Then
MsgBox "You cannot save until the Category 1 has been set.", vbCritical + vbOkOnly, "Category 1 Not Set"
rtnCancel = True
End If
If InventoryObject.Category2ID = "ZZZZZZZZZZ0000000002" Then
MsgBox "You cannot save until the Category 2 has been set.", vbCritical + vbOkOnly, "Category 2 Not Set"
rtnCancel = True
End If
If InventoryObject.Category3ID = "ZZZZZZZZZZ0000000003" Then
MsgBox "You cannot save until the Category 3 has been set.", vbCritical + vbOkOnly, "Category 3 Not Set"
rtnCancel = True
End If
If InventoryObject.Category4ID = "ZZZZZZZZZZ0000000004" Then
MsgBox "You cannot save until the Category 4 has been set.", vbCritical + vbOkOnly, "Category 4 Not Set"
rtnCancel = True
End If
If InventoryObject.Category5ID = "ZZZZZZZZZZ0000000005" Then
MsgBox "You cannot save until the Category 5 has been set.", vbCritical + vbOkOnly, "Category 5 Not Set"
rtnCancel = True
End If
End Sub