Current Combo box selection

jojo

Registered User.
Local time
Today, 00:14
Joined
Jul 20, 2012
Messages
51
I have a combo box on a form, and the control source is created by the query builder. When the user selects a value from the drop-down, I need text box elsewhere on the form to display a different field of the same record in the same query. This table was designed (not by me) with just the fields and no autonumber. I simply need a different field of that same record to appear in a text box. How can I identify this field of this record (something with currenRecord poperty)? Access 2010
I thank you in advance and for all the great answers I have read in other threads at this great site!
Jojo
 
Make sure the additional column that you need is included in the Row Source query of the combo box. You may need to modify the Column Count and Column Width properties of the combo to accommodate this. Then, in the Control Source of the text box where you want the value to appear put;

=[YourComboBox].Column(n)

where n represents the position of the additional column in the combo box query. The index is zero based, so the first column is Column(0), the second is Column(1), etc.
 
Thank you so much to Beetle, Duly registered boozer! Your suggestion including the code, I assume was meant to set as a property in property sheet, and it did not work, but I coded that as the textbox.value in the after update event of the combo box, and it works!!! I would NEVER have managed to figure out to use column(n) on my own. I am so appreciative for that and for the quick reply! Also thank you for the additional comment that the column count is 0-based; I thought so, but wasn't sure.
This forum is so interesting and helpful...i have learned much from others' posts and great replies like yours.
If you got this reply, could you let me know, as I am not sure I clicked on the correct icons to send you the reply and the thanks.
Thanks again!
Jojo
 
Thank you so much to Beetle, Duly registered boozer! Your suggestion including the code, I assume was meant to set as a property in property sheet, and it did not work, but I coded that as the textbox.value in the after update event of the combo box, and it works!!! I would NEVER have managed to figure out to use column(n) on my own. I am so appreciative for that and for the quick reply! Also thank you for the additional comment that the column count is 0-based; I thought so, but wasn't sure.
This forum is so interesting and helpful...i have learned much from others' posts and great replies like yours.
If you got this reply, could you let me know, as I am not sure I clicked on the correct icons to send you the reply and the thanks.
Thanks again!
Jojo
 
Yes, I got your reply, twice. ;)

Happy to help.
 

Users who are viewing this thread

Back
Top Bottom