I am not sure what filter and filteron properties do. Im still very new to access so I am doing what a I basically know thus far.
Below is a picture of the screen im working on. afterupdate is already in use on the combo box for when a selection is made in the drop down. the selection filters the report and requeries it using the tempvar. heres the sql code for the rcrd source
Code:
SELECT TblModUnits.*, TblShiftDetail.WorkCodeID, TblWorkCodes.WorkCodeDesc, TblShiftDetail.RegHours, TblShiftDetail.OTHours, TblShift.ShiftDate
FROM ((TblModUnits RIGHT JOIN TblShiftDetail ON TblModUnits.ModUnitSerialNum = TblShiftDetail.ModUnitSerialNum) RIGHT JOIN TblShift ON TblShiftDetail.TimeID = TblShift.TimeID) LEFT JOIN TblWorkCodes ON TblShiftDetail.WorkCodeID = TblWorkCodes.WorkCodeID
WHERE (((TblModUnits.ModUnitSerialNum) Like [TempVars]![tmpModUnit] & "*"))
ORDER BY TblModUnits.ModUnitSerialNum;
it works great and it does exactly what I want. My clear selection button works good to it is this:
Code:
Private Sub Command86_Click()
Me.cboModUnit.Value = Null
End Sub
it sets it null and that's what I want. So now what I need is to tell the combobox to go back to default if the value is null. that's all I need but I don't know how to type that out properly.
the combobox is this currently when its working
Code:
Private Sub cboModUnit_AfterUpdate()
TempVars.Add "tmpModUnit", Me.cboModUnit.Value
Me.DS.Requery
End Sub
So what do I add where to adjust it back to all data when the combobox is null?