Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating a bound combo box
Message
De
12/09/2001 14:28:52
 
 
À
12/09/2001 14:05:10
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Divers
Thread ID:
00554864
Message ID:
00555628
Vues:
18
This message has been marked as a message which has helped to the initial question of the thread.
>
me.text1.value = me.mycombo.listindex + 1
>otherwise I was getting the wrong employee.
>>
>>Doing that made it work except for the first employee whose list index is 0. When I use any other employee it works ok but if I use the first employee, it doesn't find them when the form refreshes.
>
>What are you using to restore to select the correct employee again? I noticed that the ListIndex property is read-only (I am used to VB where you can change it)
>
>Whatever you are using, try saving it without adding 1 and setting it back to the saved value + 1.
>
>
>I am using:
>
Me!MyCombo.Value = Me.Text1.Value
to restore the employee.

OK, instead of using ListIndex directly and assuming that the bound column is the employee id, use this to save the employee id:
me.text1.value = me.mycombo.itemdata(me.mycombo.listindex)
And restore it with:
me.mycombo.value = me.text1.value
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform