paulnnosh
MIS
- Mar 25, 2004
- 32
Hi guys,
I am trying to filter a subform to list only those records that have an Action Date less than todays date. I am running the following code:
Private Sub butOverdue_Click()
Dim strFilter As String
strFilter = ""
strFilter = "[Action Date] < #" & Format$(Date, "dd/mm/yyyy") & "#"
Debug.Print strFilter
If Len(strFilter) Then
Me!subProspects.Form.Filter = strFilter
Me!subProspects.Form.FilterOn = True
End If
End Sub
When I run this the content of strFilter is:
[Action Date] < #11/06/2004#
but all the filter does is strip out all records with an empty date field.
Any anybody shed any light please?
Many Thanks
I am trying to filter a subform to list only those records that have an Action Date less than todays date. I am running the following code:
Private Sub butOverdue_Click()
Dim strFilter As String
strFilter = ""
strFilter = "[Action Date] < #" & Format$(Date, "dd/mm/yyyy") & "#"
Debug.Print strFilter
If Len(strFilter) Then
Me!subProspects.Form.Filter = strFilter
Me!subProspects.Form.FilterOn = True
End If
End Sub
When I run this the content of strFilter is:
[Action Date] < #11/06/2004#
but all the filter does is strip out all records with an empty date field.
Any anybody shed any light please?
Many Thanks