General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Problems summing values in one field between 2 dates
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
Thanks Kelly
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only