Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding records to a table via combobox
Message
From
07/05/1998 12:47:45
 
 
To
07/05/1998 02:32:36
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00097388
Message ID:
00097744
Views:
24
Cetin -

I did get Nick's code to work for me, but still intend to try yours (I really want to have a class for this). How does your situation differ from that of Nick's with respect to row source, control source, table buffering, etc. I still don't feel I have a good handle on the combobox in this situation (a rite of passage?) and want to try several variations in the hope it sinks in.

Sylvia

>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform