Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating a bound combo box
Message
From
10/09/2001 16:30:31
 
 
To
10/09/2001 16:12:56
General information
Forum:
Microsoft Office
Category:
Access
Miscellaneous
Thread ID:
00554864
Message ID:
00554908
Views:
11
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).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform