Hi, I have the following sql query. I would like to be able to create a form by which a user can select their date range maybe inputting the date in a textbox for startdate and another for enddate. Also give the option to select from b.category an option of 4 categories stored in the table. There are 4 categories that are present on the table; ot, at, ut, and it. I would like to have the option for the user to choose their selection and output the selected data in a report in vfp. Im not familiar with forms but i believe this is the only way that i can have the user run the sql query through a form. Would really like the help on how to accomplis this. The following sql query outputs into data to the cursor crsToExcel where descript = "c" and b.category ="ot"
The highlighted parts are what i want to user to specify as their desire.
Thank you
startdate = Date(2013,09,01)
enddate = Date(2013,11,21)
Select A.Oridate, A.anum, B.price, B.ordqty, B.shipqty, B.Descript, B.category ;
from A inner Join B On A.anum = B.anum ;
where A.Descript = "c" And B.category = "ot" AND ;
A.Oridate ;
between m.startdate And m.enddate ;
into cursor crsToExcel ;
nofilter
The highlighted parts are what i want to user to specify as their desire.
Thank you
startdate = Date(2013,09,01)
enddate = Date(2013,11,21)
Select A.Oridate, A.anum, B.price, B.ordqty, B.shipqty, B.Descript, B.category ;
from A inner Join B On A.anum = B.anum ;
where A.Descript = "c" And B.category = "ot" AND ;
A.Oridate ;
between m.startdate And m.enddate ;
into cursor crsToExcel ;
nofilter