I have a method called SetDateFilter at the form-level which doesn't work correctly; it looks okay, but doesn't do the job. It filters out all of the data, no matter what the Dates are. The user enters a date range, a FROM date and a THRU date. The table's name is QUOTES. The field in question is called "dQuote" for the data of the Quote. When I use this and give a range of known good records, the table goes to EOF, which isn't quite what I was looking for. And, sometimes I get an error message on my variable below called "dThru".
Here's my code:
WITH ThisForm
IF NOT EMPTY(.txtDateFrom.Value) AND ;
dFrom = CTOD(.txtDateFrom.Value)
dThru = CTOD(.txtDateThru.Value)
SET FILTER TO BETWEEN(Quotes.dQuote, dFrom, dThru)
GO TOP
.Refresh()
ENDIF
ENDWITH