Guys,
Can you help me, I have written some code to filter some data by date.
All data is in the correct format, and when the code is run the filter is activated with the relevant search criteria but nothing is displayed in the data file.Code:' Sets the Date criteria for searching TDate = Format((Now - 2), "dd/mm/yyyy") ' Filters for all receipts that are older than 24 hours Selection.AutoFilter Field:=7, Criteria1:="<=" & TDate
However when I go into the filter manually on the data file, all the coded criteria is correct and when I confirm manually the filtered data is displayed.
Why is the code not automatically displaying the data?
Thanks
SJ




Reply With Quote