Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox, RowSource,ControlSource & Displayvalue
Message
 
 
À
19/09/2001 11:46:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00558368
Message ID:
00558629
Vues:
19
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
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform