Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cross-cou;ling comboboxes in grid?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Cross-cou;ling comboboxes in grid?
Divers
Thread ID:
00262958
Message ID:
00262958
Vues:
75
Novice question....

How can I update the value in a second grid column based on a selection in the first?

I have an order entry screen with a grid. One column is the product ID and the other is the product description. There is a products table and an orderitems table. Only the product ID will be stored in the orderitems table. Product description is used for reference only.

I would like to use combo boxes in each column. The row source will be the fields ProductID and Description in the products table. The control source field for the productid column will be orderitems.productID.

Here's the challenge: I would like the user to be able to select the desired item by either of the following methods:
a: If product ID is known, select product ID by incremental search or dropdown list. When selected, the product ID is stored in the orderitems.productID record and the proper product description will appear in the description field.
b: Select the product by dropdown from the description list. When selected, the proper productID will be displayed in the productID column, and entered in the orderitems.productID record.

I suspect that the code should be entered in the valid event of the combo boxes, and I'll be stuffing the .value property of the productID field. What I'm not sure of is matching the corresponding values of productID and description when selecting and stuffing. Will selecting one move the record pointer in the products table to the desired item? Will I need to refresh the form at that point?

Any suggestions?

Thanks,
Neil Preston
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform