I have created a form with a combo box to filter a subform using a date.
The filter works great but not with dates starting with a 0 e.g 01/07/2006
I have set the format to short date for the combo box, the table that feeds the combo box and the subform to be filtered.
I have also set the format in the code see below.
Private Sub Week_Ending_AfterUpdate()
[Form_Record Activity].Data_Subform.Form.FilterOn = False
If Week_Ending = 0 Then Exit Sub
Date_On_Box$ = Format$([Form_Record Activity].Week_Ending, "dd/mm/yyyy")
[Form_Record Activity].Data_Subform.Form.Filter = "[Week Ending Date] = #" & Date_On_Box$ & "#"
[Form_Record Activity].Data_Subform.Form.FilterOn = True
End Sub
I would be very grateful if anyone can help please.
|