Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drop Down Combo Troubles
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00047397
Message ID:
00048037
Vues:
29
>>>>Hi Everyone!
>>>>
>>>>I am developing in VFP 3.0 and I am tearing me hair out over this one. I have a dropdown combo on my form where ControlSource = Client.City, RowSourceType = Alias and RowSource = CityStateZipTable. What I want to do is maintain a lookup table of Cities, states, and zips that the user can update on the fly when entering client information. I have code in the interactivechange method of the combo box to update the city, state, and zipcode fields if it finds a match in the CityStaeZipTable. Everything works fine except that I can't enter a new city. Am I trying to do something that can't be done here? Any suggestions?
>>>>
>>>>TIA.
>>>>
>>>>MArcia
>>>IF you want to add information to a table that is entered into the combo box by a user you have to update the table using the 'displayvalue' of that control if what the user types in is not in the list. Perhaps something like:
>>> Insert into CityStateZipTable (cityfield) values (thisform.comboname.displayvalue)
>>>HTH
>>Hi George.
>>Thanks for the quick response. Actually, I was updating the table. But I was trying to get fancy and have the text box portion of the combo do its own incremental search and update all the fields in the form based on the first match found. What screwed me up was changing the displayvalue in the interactivechage method. When I did that, the box wouldn't let me enter any new values. But I finally figured it out. What a painful experience!
>Glad you got it worked out. I've been there before :)
Hi George.

Actually, there is one final wrinkle to work out. When I start typing characters into the combo box, the cursor disappears. Is there some easy way to keep the cursor visible?

TIA

Marcia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform