Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems summing values in one field between 2 dates
Message
From
04/03/2000 12:28:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Problems summing values in one field between 2 dates
Miscellaneous
Thread ID:
00341684
Message ID:
00341684
Views:
50
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
Map
View

Click here to load this message in the networking platform