>Can I create a parametrized query(ddateFrom-ddateTo) that drops their results in a ListBox or on another control ?
>
>Thanks in advance.
Yes.
You can do this in any of several ways. You can use straigh SQL, or a parameterized view defined in the database container.
A regular query would look like
ldBeginDate = {05/05/95}
ldEndDate = {07/07/1997}
SELECT Field1 ;
FROM myTable;
WHERE myTable.BeginDate = ldBeginDate;
AND myTable.EndDate = ldEndDate;
INTO CURSOR myCursor
THISFORM.EditBox1.RowSourceType = 1
THISFORM.EditBox1.RowSource = "myCursor"
With a view, you would define the view first with parameters in the WHERE clause
(WHERE EndDate = ?ldEndDate AND StartDate = ?ldStartDate)
Then, when you go to REQUERY the view, just fill the parameters and requery:
ldBeginDate = {05/05/95}
ldEndDate = {07/07/1997}
REQUERY('myView')
Grids, Listboxes and Comboboxes can all have cursors as their rowsource.
Erik Moore
Clientelligence