Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating a bound combo box
Message
De
10/09/2001 16:30:31
 
 
À
10/09/2001 16:12:56
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Divers
Thread ID:
00554864
Message ID:
00554908
Vues:
10
This message has been marked as the solution to the initial question of the thread.
>I think that would work but am not sure of the syntax. The textbox
>
>
controlsource = empid
>rowsourcetype = table/query
>rowsource     = sql statement
>
>I don't know how to reference the index. TIA

So when you select an employee from the combobox, the textbox is also populated (because it's bound to the table field)?

To obtain the index of the selected item in a combobox, use the ListIndex property. So when the user presses post, save the selected employee with:
myInt = me!mycombo.ListIndex
And restore it by assigning the myInt var back to ListIndex for the new record. Also I was thinking, you could use a bookmark for this. With a bookmark you don't worry about somebody else adding an employee in another workstation and throwing your listindex out of synch (that is, if you are reloading the employee table each time).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform