Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drop Down Combo Troubles
Message
From
29/08/1997 10:36:34
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00047397
Message ID:
00047586
Views:
31
>>>>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 :)

all of us have been there :)
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Previous
Reply
Map
View

Click here to load this message in the networking platform