Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Boxes pointing to Local Views
Message
 
À
09/12/1999 15:25:06
John Vlahos
V I Software Solutions Design
Mississauga, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00301233
Message ID:
00301425
Vues:
24
John,
First, you should update the combos as you move through the view. Second, as part of the form refresh after each record change you should be sure the correct data is showing for each combo.

If the combos are bound to fields they SHOULD update correctly without further intervention. If not, you may have to set the value: Thiscombo.value = Mytable.Field1

Don't forget that after re-doing the SELECT statement for each combo you must also do a combo.requery() so the data shows in the combo.

HTH
Barbara

>Hi,
>
>I have 5 combo boxes on a sales order form:
>Cobox Box              ControlSource
>=========              =============
>cboCustCode            lvSO.CustCode
>
>cboBillToCode          lvSO.BillToCode
>cboBuyerCode           lvSO.BuyerCode
>cboShipToCode          lvSO.ShipToCode
>cboTransportCode       lvSO.TransportCode
>The last four contain only the allowable selections pertaing to a specific Customer which the user will initially choose (cboCustCode).
>To do this, in the GotFocus() event of each of the last combo boxes I code:
>
>SELECT BILLTOCODE, BILLNAME,BILLADDRESS1,BILLPROVINCE, BILLPOSTALCODE, BILLPROVINCECODE, BILLCOUNTRYCODE, BILLATTENTION FROM CUSTOMER_BILL_TO WHERE CUSTOMERID=CUSTOMER.ID
>
>I do this for the buyer,shipto, and transport.....
>
>lvSO is a complete local view of SO table.
>
>My problem is that when I move through the local view lvSO, (Next, previous, etc., command buttons on my SO form, the value stored in my last four combo boxes is not displayed, even though the lvSO view and the SO table contain and display the same and identical data!
>
>The selections of the combo boxes are OK.
>
>Why is this happening?
>
>If I replace the combo boxes with text boxes, everything works great, but I can nnot use this solution, because this would require the user have a huge memory and remember all codes for each customer. :0(
>
>Any suggestions?
>
>Thanks in advance!
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform