Combobox

cs_fabien82 Messages postés 2 Date d'inscription mercredi 11 octobre 2006 Statut Membre Dernière intervention 5 décembre 2008 - 5 déc. 2008 à 14:09
NHenry Messages postés 15112 Date d'inscription vendredi 14 mars 2003 Statut Modérateur Dernière intervention 13 avril 2024 - 5 déc. 2008 à 16:13
Bonjour,

Je souhaite affecter un Int à la variable 'titre' en récupérant le itemData d'un élément d'une combobox
>   titre IIf((comboCli(0).ListCount > 0), comboCli(0).ItemData(comboCli(0).ListIndex), 0)
Si la combobox est vide, on affecte 0 à la variable.
Pourtant, il y a une erreur......
Index de groupe de propriétés incorrect. (Erreur 381)

Pouvez-vous m'aider????

Merci

1 réponse

NHenry Messages postés 15112 Date d'inscription vendredi 14 mars 2003 Statut Modérateur Dernière intervention 13 avril 2024 159
5 déc. 2008 à 16:13
Bonjour,

Car "comboCli(0).ItemData(comboCli(0).ListIndex)" est évalué, donc pas bon.
Regarde l'aide de IIF, tu verra que les 2 expressions sont évaluées.

http://nhen0039.chez-alice.fr/index.php
0
Rejoignez-nous