lcFilter = [Quotes.dQuote >= {] + transform(dFrom,'^9999-99-99') + [} and Quotes.dQuote <={] + transform(dThru,'^9999-99-99') + '}' set filter to &lcFilter locate&& Better to use locate than GO TOP
>WITH ThisForm > IF .IsChanged() > .SaveIt() > ENDIF > IF EOF() > GO BOTTOM > .bottomButton.Enabled = .F. > .nextButton.Enabled = .F. > ELSE > SKIP > IF BOF() >...more code >>
>WITH ThisForm > IF NOT EMPTY(.txtDateFrom.Value) AND ; > NOT EMPTY(.txtDateThru.Value) > * Build the From Date. > cFrom = .txtDateFrom.Value > cFromMonth = LEFT(cFrom, 2) > cFromDate = SUBSTR(cFrom, 3, 2) > cFromYear = RIGHT(cFrom, 4) > dFrom = CTOD(cFromMonth + "/" + cFromDate + "/" + cFromYear) > SET STEP ON > * Build the Thru Date. > cThru = .txtDateThru.Value > cThruMonth = LEFT(cThru, 2) > cThruDate = SUBSTR(cThru, 3, 2) > cThruYear = RIGHT(cThru, 4) > dThru = CTOD(cThruMonth + "/" + cThruDate + "/" + cThruYear) > SELECT Quotes > SET FILTER TO BETWEEN(Quotes.dQuote, dFrom, dThru) > GO TOP > .Refresh() > ENDIF >ENDWITH >>>Did you check values in dFrom and dThru? CTOD() will return empty date if it cannot convert the parameter passed to a date.