Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo with listbox
Message
From
24/08/2004 10:38:21
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
24/08/2004 10:23:35
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00935923
Message ID:
00935930
Views:
26
This message has been marked as a message which has helped to the initial question of the thread.
>I'd like to use a combo with a listbox to display one-to-many tables. When an item is selected in the combo, the listbox would display the items in the "many" tables. Is it a proper way to do this and how would I start?
>Thanks,
>Tamás Szigeti

In both use a rowsourcetype of 3 - SQL. In listbox.RowSource reference to combo RowSource's cursor and requery as appropriate. ie:
*Form.Init
with this.cmbCustomers
 .RowSourceType = 3
 .RowSource = 'select company,cust_id from customer into cursor crsCust'
endwith
with this.lstOrders
 .RowSourceType = 3
 .RowSource = 'select * from orders where cust_id = crsCust.cust_id into cursor crsOrder'
endwith

*cmbCustomers.InteractiveChange
with this.parent.lstOrders
  .ListIndex = 0
  .Requery()
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform