Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox, RowSource,ControlSource & Displayvalue
Message
From
24/09/2001 06:14:40
 
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00558368
Message ID:
00559878
Views:
20
Thank you for taking the time. I actually got it to work with a cursor too.


>Hi!
>
>Add a value to the combobox list using AddItem or AddListItem. Then refresh the combobox using only ControlSource = ControlSource assignmnet (otherwise record in the B will be marked as changed). Remember that you can add items to ANY type of the row source, because combobox contains just a copy of the data. You can mark that value by some way or disable it, so you will remove it as soon as record is changed to do not requery data again.
>
>HTH.
>
>>I'd like to achieve the following:
>>
>>From a view like
>>
>>CREATE VIEW ShortList AS;
>>SELECT C1,C2 FROM A WHERE NOT EXISTS;
>>(SELECT C1,C2 FROM B WHERE A.C1=B.C1 AND A.C2=B.C2)
>>
>>I.o.w., only items that are not already in B are can be added to B.
>>
>>This produces the desired results, but, assuming that the controlsource=B and the rowsource=ShortList, the combo's displayvalue is empty.
>>
>>I have tried This.DisplayValue=B.C2 and a few other things with varying results, but none that displayed the desired value in the combobox.
>>
>>The second issue has to do with something similar:
>>
>>Once a value from ShortList is entered into B, ShortList is requeried, and should now theoretically, be even shorter.
>>
>>Not so.
>>It seems, that if B is buffered, this is not the case.
>>I don't want to force the user to click a save button every time (s)he has decided to add an item from Shorlist to B.
>>
>>What to do???
>>
>>TIA
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Reply
Map
View

Click here to load this message in the networking platform