I like ti fil two popup menu with the same value.
The first code is running very well but the second code listet only the first item.
In the first code there are two separate Popupmenu, in the seccond case the popupmenu are members.
What is wrong?
1. Code:
SQL="SELECT * FROM Sponning;"
If OpenDataBase Then
Data=DBase.SQLSelect(SQL)
While Not Data.EOF
If Data.Field("Type").StringValue <> "" Then
TempStr = Data.Field("Type").StringValue+" - "+ Str(Data.Field("Nummer").Value)
for N=0 to PopupSpomLi.ListCount-1
PopupSpomLi.ListIndex=N
if PopupSpomLi.Text=TempStr Then goto Sprong
Next
PopupSpomLi.AddRow TempStr
PopupSpomRe.AddRow TempStr
End If
Sprong:
data.MoveNext
Wend
End if
PopupSpomLi.ListIndex=0
PopupSpomRe.ListIndex=0
2. Code:
SQL="SELECT * FROM Sponning;"
If OpenDataBase Then
Data=DBase.SQLSelect(SQL)
While Not Data.EOF
If Data.Field("Type").StringValue <> "" Then
TempStr = Data.Field("Type").StringValue+" - "+ Str(Data.Field("Nummer").Value)
For N= 0 To PopNeut(2).ListCount-1
PopNeut(2).ListIndex=N
If PopNeut(2).Text=TempStr Then GoTo Sprong
Next
PopNeut(8).AddRow TempStr
PopNeut(2).AddRow TempStr
End If
Sprong:
Data.MoveNext
wend
DBase.Close
End If
PopNeut(8).ListIndex=0
PopNeut(2).ListIndex=0