Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot change the data in combo box
Message
From
25/03/1998 13:52:04
 
 
To
25/03/1998 13:47:00
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00087083
Message ID:
00087091
Views:
30
>I made a combo box From which I select a table from my supplier database. The SQL coding of the RowSource is "Select product.code, product.desc from product where product.supplier = order.supplier into cursor cProductCombo order by product.code".
>
>I found a problem that the data in the cProductCombo cannot change whenever the value of the order.supplier was changed.
>
>Would you please give me any suggestion.

WHat you're doing with the SELECT statement is a LEFT JOIN...this is completely unaffected by the record pointer in 'order'.

What you want is a parameterized view....change the statement to:

Select product.code, product.desc from product where product.supplier = ?order.supplier into cursor cProductCombo order by product.code

Note the "?" in front of order.supplier. This change will give you only those records currently matching the value of order.supplier.

Also, where the order.supplier can be changed, ensure that you call the Requery method of the combo box.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform