Hi, I'm having a problem checking fields in my subform. On the main form there is a save button. The subform is a continuous form of items with an item quantity field. I want the save button to look if any items have a quantity of 0. The code I have works fine if I have only one item with a quantity of 0, or multiple items all with 0 for the quantity. However if I have two items, one with a qty>0 and one with a qty=0 it doesnt display the message. What do I need to do to check each individual qty value rather than the sum of all of them?
Code:
If Me.OrderDetailSubform.Form.itemqty = 0 Then
If MsgBox(strMsg, vbOKCancel, "Warning!") = vbOK Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Call LockOrder
Exit Sub
Else
Exit Sub
End If
Comment