Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding records to a table via combobox
Message
From
07/05/1998 02:32:36
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/05/1998 14:51:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00097388
Message ID:
00097586
Views:
25
>Nick -
>
>I tried your code first because it was shorter, but still can't get it to work. At a basic level, for some reason my insert into my Cities table (I'm trying to add "Test") isn't working, which is probably why when I try to then save the record I get a trigger failure (anyway when I check the cities table nothing is there). Another issue though is the combobox "ControlSource". Only when I set it to "" does the phrase I type remain on the combobox after I lose focus. But it seems to me if I don't have a control source then, when I navigate through my records, the same city will display for all the records.
>
>sylvia
Sylvia,
(Nick correct me if not true) In Nick's method it's important what your rowsource is and if fields or SQL, when requeried would update the list from original source. If it's the table you're using and buffering is on then additem item would be dropped (true Nick ?) or SQL then also would be refreshed (updated) from source. BTW main difference between refresh and requery (saying in other words than help) one deals with controlsource(s) while the other deals with rowsource. If you're using a rowsource from a lookuptable then :
*Gotfocus
this.displayvalue = this.value
*Lostfocus
this.value = this.displayvalue
this.displayvalue = this.value
could be all you need (never was for me so wrote that class).
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