>I'm new at visual fox pro trying to sum records from a field that is called paidamout between certain matching dates which a user will input in 2 text boxes that will match up with a field called paiddate. Then hit a button that runs my select sum statement. The problem is if I put in a fixed date in the where statement like WHERE Inv.solddate = {5/30/95} it works but, when I try to get it from the text box value it gives me this error that says operator/operand type mismatch. Here is my select statement, which I have in the procedure of the command button.
>
>local setdate1 setdate2
>setdate1 = thisform.text1.value
>setdate2 = thisform.text3.value
>
>SELECT SUM(Inv.soldprice);
> FROM pawn!Inv;
> WHERE Inv.solddate BETWEEN setdate1 AND setdate2
>
Have you initialized the values for text1 and text2 with dates? If not, the odds are that a character expression rather than an date is being passed.