>>Jimmy-
>>
>>>
>>>I don't understand how to reference a particular field in a cursor - nor how to "declare a field in a cursor." for instance... would i say this:
>>>select table.field as cursorfieldname
>>>from table
>>>into cursor cursorname
>>
>>You reference fields in a cursor just like you do a table. Indeed, "cursor" really refers to any record source once it's open, whether it came from a view, or a table. The thing is that unless you direct the SQL Select to something to hold the data, it just get's dumped in a browse..which isn't what you want.
>>
>>
SELECT data1.bundle as Total12;
>>FROM lumber!data1 <B>INTO CURSOR vwDATA1<b> ;
>>WHERE siz = szValue and grade = gdValue and length = 2;
>>[...snip]
>>
tb2 = vwData1.Total12 + [etc]
>>
>>FWIW, this logical structure looks problematic to me, but then you were asking about how you get rid of the browse windows popping up.
>
>
>It is problematic, but I don't know how else to do it yet. I've only been programming for a couple of weeks now. It's telling me that "variable 'Total12' is not found".
>
>here's my code:
>
>
>
>SELECT data1.bundle as Total12;
>FROM lumber!data1 into cursor bundata;
>WHERE siz = szValue and grade = gdValue and length = 2;
>
>
>SELECT data2.bundle as Total22;
>FROM lumber!data2 into cursor bundata;
>WHERE siz = szValue and grade = gdValue and length = 2;
>
>
>SELECT data3.bundle as Total32;
>FROM lumber!data3 into cursor bundata;
>WHERE siz = szValue and grade = gdValue and length = 2;
>
>
>SELECT data4.bundle as Total42;
>FROM lumber!data4 into cursor bundata;
>WHERE siz = szValue and grade = gdValue and length = 2;
>
>
>SELECT data5.bundle as Total52;
>FROM lumber!data5 into cursor bundata;
>WHERE siz = szValue and grade = gdValue and length = 2;
>
>
>SELECT data6.bundle as Total62;
>FROM lumber!data6 into cursor bundata;
>WHERE siz = szValue and grade = gdValue and length = 2;
>
>SELECT data7.bundle as Total72;
>FROM lumber!data7 into cursor bundata;
>WHERE siz = szValue and grade = gdValue and length = 2;
>
>
>SELECT data8.bundle as Total82;
>FROM lumber!data8 into cursor bundata;
>WHERE siz = szValue and grade = gdValue and length = 2;
>
>
>tb2 = bundata.Total12 + bundata.Total22 + bundata.Total32 + bundata.Total42 + bundata.Total52 + bundata.Total62 + bundata.Total72 + bundata.Total82
Jimmy,
There is no Total12 just after the second select. You're repeatedly selecting into same cursor "bundata" overwriting the other alias. Either do it just one select as I told you at the beginning or use different alias names (ie: bundata12 for total12 selection then refer to it as bundata12.total12).
Cetin