>In the button's click event I put this code:
>
>select data1.boardfeet, data2.boardfeet, data3.boardfeet, data1.total, data2.total, data3.total;
> from data1, data2, data3;
> where data1.siz = thisform.pageframe1.page2.sz1.displayvalue;
> or data2.siz = thisform.pageframe1.page2.sz1.displayvalue;
> or data3.siz = thisform.pageframe1.page2.sz1.displayvalue;
>
>I'm not getting what I'm supposed to.
Do not put object reference values in the SQL. Use local variables instead. Ideally, I would create a parameterized SQL view.
create sql view myview as ;
select data1.boardfeet, data2.boardfeet, data3.boardfeet, ;
data1.total, data2.total, data3.total ;
from data1, data2, data3;
where data1.siz = ?cSize ;
or data2.siz = ?cSize ;
or data3.siz = ?cSize ;
blah, blah, blah
In the form, open MyView with the NODATA clause. For example, put the view in the Data Environment, set the NoDataOnLoad property to TRUE, in the BeforeOpenTables, include the following:
set talk off
set deleted on
set exclusive off
set multilocks on
Then in the Click of your command button:
local cSize
cSize = alltrim(thisform.pageframe1.page2.sz1.displayvalue)
requery("MyView")
Mark McCasland
Midlothian, TX USA