I have a main form with 5 subforms. I use a yes/no field in each of the 5 underlying tables to manage my picks per subform.
EG I checkmark a few customer type in the first subform. I checkmark cust classes. etc.
However, I need to reset the 5 subforms to have an empty y/n when I am done.
I have a query inside EACH subform to allow me to clear or reset the y/n field.
That is 5 buttons that I hit. But I would like to consolidate into ONE Clear or reset button.
I inserted the sql that works for each button and tried placing them together (see below). But the One button method bombed out.
Anyway to do this? Thank You.
------------------------------------------------------------------------
Private Sub cmdClearALL_Click()
UPDATE tblCustType SET tblCustType.PickCusTypeID = Null;
UPDATE tblCusClass SET tblCusClass.PickCusclassID = Null;
UPDATE tblRep SET tblRep.PickRepID = Null;
UPDATE tblMailRegion SET tblMailRegion.PickMailRegionID = Null;
UPDATE tblReferredBy SET tblReferredBy.PickReferredBy = Null;
End Sub
EG I checkmark a few customer type in the first subform. I checkmark cust classes. etc.
However, I need to reset the 5 subforms to have an empty y/n when I am done.
I have a query inside EACH subform to allow me to clear or reset the y/n field.
That is 5 buttons that I hit. But I would like to consolidate into ONE Clear or reset button.
I inserted the sql that works for each button and tried placing them together (see below). But the One button method bombed out.
Anyway to do this? Thank You.
------------------------------------------------------------------------
Private Sub cmdClearALL_Click()
UPDATE tblCustType SET tblCustType.PickCusTypeID = Null;
UPDATE tblCusClass SET tblCusClass.PickCusclassID = Null;
UPDATE tblRep SET tblRep.PickRepID = Null;
UPDATE tblMailRegion SET tblMailRegion.PickMailRegionID = Null;
UPDATE tblReferredBy SET tblReferredBy.PickReferredBy = Null;
End Sub