Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box list order?
Message
 
To
26/10/1999 02:57:17
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00276040
Message ID:
00281587
Views:
19
Further notes...

Unfortunately, the easy answer becomes much more complicated in this implementation. The value of several other fields depends on the value selected in this combo.

This is an order entry line item, where the user can select by productID or by description. Using the Description DDListbox, they look up the value from the products table, and only the product ID is actually stored in the orderitems table. Selecting a product description picks that record in the products table, then uses the productID, color, and price values from that record to update the corresponding fields on the remainder of the line item.

When reviewing the order, the description field must be displayed from the products table based on the productid stored in the orderitems table.

Using the RowsourceType of Fields works fine, except for the displayed order of the items in the Description DDList box.

I tried using the SQL Statement, and the order looked great, but getting the correct values stored in the other fields and then displaying the description when coming back to review the order became very complex. I haven't figured that all out yet.

Any more suggestions?

Thanks,
Neil


>Hi Neil.
>
>>> The Orderitems table has a relation to the Products table through a link between the product ID field. If I call up the properties of the relation, I can change the order, but that messes up the relationship for some reason. <<
>
>This is what I would expect to happen. See the on-line help for SET RELATION for a better understanding of why.
>
>>> I've also tried placing a SET ORDER TO in the list box init event, but that didn't solve it either. <<
>
>Well, the easy answer is to switch to RowSourceType 3-SQL Statement and set your RowSource to SELECT Yada, Nada, Blah FROM MyTable ORDER BY Whatever INTO CURSOR MyCursor and be done with it. Personally, SQL is my favorite RowSourceType. I think it gives me the flexibility I need without too much overhead.
>
>Marcia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform