Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Eddie Ruiz
  Where is Eddie Ruiz?
 Hawthorne
 United States
 Eddie Ruiz
 Tags
Subject: option group / check boxes question
Thread ID: 395980 Message ID: 395980 # Views: 48 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Wednesday, January 22, 2014 3:31:30 AM         
   


Hi, im currently using the following data to export some information from dbfs 1, 2 and 3, the code located when a user clicks a button in a form after the user inputs their desire date range.



LOCAL ldStartdate, ldEnddate, ldcategory
ldStartdate = thisform.startdatetextbox.value
ldEnddate = thisform.enddatetextbox.value

* verify values
If NOT vartype(ldStartdate)+Vartype(ldEnddate)=="DD"
Messagebox("wrong date entry")
Return
Endif
If ldEnddate Messagebox("wrong date range")
Return
ENDIF


Select 1.ntype, 1.ndate, 1.nnum, 1.cusnum, 2.cusname, 3.price, 3.ordqty, 3.shipqty, 3.Descript, 3.category ;
from 1 inner Join 3 On 1.nnum = 3.nnum ;
inner join 2 ON 2.cusnum = 1.cusnum ;
where 1.ntype = "C" and;
1.ndate;
between m.ldstartdate And m.ldenddate ;
into cursor crsToExcel ;
nofilter

COPY TO (PUTFILE("Enter Orders Excel Sheet Name","orders.xls","XLS")) TYPE XLS

***************************
What I would like to accomplish is be able to add option group or check boxes that a user could select to export their desire data. In table 3 there's a field called categories, theres like 5 categories stored 1=as 2=to 3=fl 4=ws and 5=pr also on table 2 theres a field called repsales theres like 5 different repsales stored 1=io 2=da 3=gr 4=lu and 5=yz. I want to be able to have the option to the user to export by selecting the desired options that i mentioned. For example user 1 can select to export from table 1 all fields with the "As"category with repsales "yz" and be able to export only this data.
How can i accomplish this? if the option group on the form works what code needs to be added to the option group and to my code above to make it happen?

Thanks for your help

I don't know what would be the best way to do this, I want to have the user choose

ENTIRE THREAD

option group / check boxes question Posted by Eddie Ruiz @ 1/22/2014 3:31:30 AM
RE: option group / check boxes question Posted by Ali Koumaiha @ 1/22/2014 4:52:09 AM
RE: option group / check boxes question Posted by Ali Koumaiha @ 1/22/2014 4:54:49 AM
RE: option group / check boxes question Posted by David Mustakim @ 1/22/2014 5:19:11 AM