Access 2016
I have a form f_WorkingHours with a subform f_WorkingHoursSub.
The subform has a combobox called cboDate in the form header.
I want to filter the [Report Date] in the subform using cboDate.
Also need the option to select all dates or unfilter to show all dates if user wants to see all dates again.
I tried this....
Private Sub cboDate_AfterUpdate()
If Not IsNull(cboDate.Value) Then
f_WorkingHoursSub.Form.Filter = " [Report Date] = " cboDate
f_WorkingHoursSub.Form.FilterOn = True
Else
f_WorkingHoursSub.Form.FilterOn = False
End If
End Sub
I have a form f_WorkingHours with a subform f_WorkingHoursSub.
The subform has a combobox called cboDate in the form header.
I want to filter the [Report Date] in the subform using cboDate.
Also need the option to select all dates or unfilter to show all dates if user wants to see all dates again.
I tried this....
Private Sub cboDate_AfterUpdate()
If Not IsNull(cboDate.Value) Then
f_WorkingHoursSub.Form.Filter = " [Report Date] = " cboDate
f_WorkingHoursSub.Form.FilterOn = True
Else
f_WorkingHoursSub.Form.FilterOn = False
End If
End Sub