Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding records with a Combobox
Message
From
19/08/1999 07:46:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00255190
Message ID:
00255192
Views:
12
>Hello All,
>I have a requirement to produce a drop down combo, that displays a field from a table, and allows the user to add a record by typing directly into the combo and hitting enter, any ideas would be appreciated as I don't have much time
>
>TIA
>
>Pete Kane
Pete,
There is a sample in Tasmanian Traders. A quick and simple coding could be :
*Combo lostfocus
this.value = this.displayvalue
if !seek(upper(this.displayvalue), "myLookup","UpperedLookupTag")
  insert into myLookUp (lookupfield) values (upper(this.displayvalue))
  insert into myTable (myField) values (mylookup.lookupfield)
endif
this.displayvalue = this.value
PS: Not tested, might need corrections.
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