I need to return the number "index" of the selected record

mvorous

mvorous
Local time
Yesterday, 16:36
Joined
May 29, 2008
Messages
46
Hello, when a user selects from a combobox, say the fourth item in the list, I need to have that "4" value returned to a textbox.
Simple, I hope, thank you in advance.
mvorous:confused:
 
mvorous,

You can use the BeforeUpdate or AfterUpdate event to:

intWhatWasChosen = me.YourCombo.ListIndex

Wayne
 
Thanks Wayne, that works fine, but what I mean to say is...
Say I have 50 types of plants in my dropdown list, available for users to pick,
I don't need to know that they picked the 4th item in the plant list, I need to know with each plant they select, a returned value, 1 for the first plant picked, 2 for the second plant picked, etc. I hope that this is clear. The default view for this modal is continuous form.
Thank you, mvorous
 
MV,

A combo-box will only let you select one entry. If you want to select multiple
entries, shouldn't you be using a multi-select ListBox?

A lot of this depends on your table structure.

Wayne
 
Thanks WayneRyan,
I botch'd my question so badly that I started over.
mvorous
 
surely you would have to use the ID value of the plant picked and return that, rather than "the first plant" or "the second plant" you mean "plant with ID 1" or "plant with ID 2"...?
 

Users who are viewing this thread

Back
Top Bottom