Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select...into cursor used in grid
Message
 
To
27/03/1998 17:20:58
Swen Nielsen
Squire Sanders & Dempsey
Cleveland, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00087832
Message ID:
00087878
Views:
37
>To clarify - thisform.currpartno is set from a PARTNUMBER table that is not related to the Inven table. Here's the setup
>
>INVEN
> vendor c(15)
> partno c(15) non-unique
> qrec n(4)
> qsold n(4)
>
>PARTNO
> partno c(15)
> [misc data]
>
>As I navigate the PARTNO table, I want my grid to display the onhand from each vendor which is (qrec - qsold). The first select willshow me the INVEN records for each partno but the second select will not.
>
>-Swen
>PS Thanks for a quick respond!

Swen, could you post the complete SQL code? It looks like you aren't linking the INVEN and PARTNO tables, so you are only seeing the single record in INVEN.

Try this:
SELECT inven.vendor, inven.partno, inven.qrec-inven.qsold AS NumLeft 
WHERE inven.partno = partno.partno AND partno.partno = thisform.CurrPartno;
INTO cursor MyCursor
Note that I linked in the Partno table. This should give you a record for each record in PARTNO which matches the thisform.CurrPartno value.

HTH
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform