Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox - ControlSource (VfP6)
Message
From
10/05/2002 07:30:40
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/05/2002 07:16:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00654950
Message ID:
00654961
Views:
20
>>Len,
>>The new value must exist in rowsource. Add it.
>>Cetin
>
>Thanks for the confirmation.
>
>Guessed that was what the answer was going to be - makes life unnecessarily complicated, I'll have to consider if there are better options, that don't involve modifying the rowsource.

But modifying the rowsource is easy.
*Combo.lostfocus
With thisform
  If ascan(.myArray,this.DisplayValue)=0
    Dimension .myArray[alen(.myArray)+1]
    .myArray[alen(.myArray)]=this.DisplayValue
    This.NumberOfElements = alen(.myArray)
  Endif
Endwith
Actually I prefer another alternative. I almost all the time use SQL as rowsource and add to my cursor.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform