[quote=257696:@Gerardo García]Perfect!. I making a Date Selector with a Controlset of three PopUpMenus, thats what i Have at this time:
[code] Select Case index
Case 0
For i as Integer = 2016 DownTo 2011
me.addrow(str(i))
Next i
Case 1
For i as double = 12 Downto 1
me.addrow(Format(i,“00”))
Next i
Case 2
me.addrow(“caso 2”)
End Select
me.ListIndex = 0[/code]
At others times I do this For Analyze the popUpMenu(1), when the Listindex = 10 (february) using an If, to determine to Add only 29 Rows in case of February, Else add 31 Rows. But Now with the ControlSet I dunno what to do, thats the code that previously used, in Change Event of Month’s PopUpMenu (I hope to be clare in my explanation):
[code] If me.ListIndex = 1 Then
popDia.DeleteAllRows
For i As double = 1 to 29
popDia.AddRow(Format(i,“00”))
Next i
Else
popDia.DeleteAllRows
For i As double = 1 to 31
popDia.AddRow(Format(i,“00”))
Next i
End If[/code]
For adapt it to this Situation I planned this, but shows me a Syntax Error:
[code] Select Case index
Case 1
If me.Listindex = 10 Then
'me(2).AddRow(“casa”)
Else
End If
End Select[/code][/quote]
Woooooohooooooo!!!.
I solved at this way:
on Change Event of my ControlSet:
[code] Select Case index
Case 1
If me.Listindex = 10 Then
popFechaInicial(2).DeleteAllRows
For i as Double = 29 Downto 1
popFechaInicial(2).AddRow(Format(i,"00"))
Next i
Else
popFechaInicial(2).DeleteAllRows
For i as Double = 31 Downto 1
popFechaInicial(2).AddRow(Format(i,"00"))
Next i
End If
popFechaInicial(2).ListIndex = 0
End Select[/code]