Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 7 Jahren, 6 Monaten
Letzter Beitrag:
vor 7 Jahren, 6 Monaten
Beteiligte Autoren:
Michael Q, Paulo Oliveira

WD15: How to select new record in a combo?

Startbeitrag von Michael Q am 07.02.2011 16:44

I can't seem to get my head around how to do this and would really appreciate some help.

I have a Combo CMB_Traveller in which the displayed item is "Name", but the stored item is TravellerID. I have a first custom row "New Traveller" which when selected will open a window to add a new traveller. After the traveller has been added, the window is closed and focus returns to the CMB_Traveller. What I want is for the new traveller to now be shown in the combo selection box. At the moment, the code below updates the combo to include the new traveller as an option, but it still shows "New Traveller" in the selection box.

It seems that the problem has 2 parts:
1. Record the TravellerID of the newly created Traveller.
2. Make the name of that traveller appear in the selection box of the combo.

I'd be really grateful for any guidance on how to do #1 & #2.

Many thanks

Row Selection of CMB_Traveller

IF CMB_Traveller..StoredValue = "NewTraveller" THEN
// Create a new record

// Open the form of Traveller file in creation mode
IF Open(WIN_Form_Traveller) THEN

// Refresh the combo


The way of doing it can be different depending on linked to a file or not.try with one of the above:
or use

von Paulo Oliveira - am 07.02.2011 19:17
Thanks Paulo,

ListDisplay(CMB_Traveller,taCurrentFirst) did the trick. (taCurrentFirst was the part that was missing).


von Michael Q - am 08.02.2011 11:29
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.