3 columns field in combo box

jerry28ph

jerry
Local time
Today, 11:47
Joined
Nov 16, 2008
Messages
141
Hi All,

I have a combo box which has 3 columns field value, and 2 text box in the form.

name, hunt_no, extension_no

When I select the name in the combo box, I want to get the hunt_no to put in the textbox2 and extension_no in the textbox3. I tried to use BoundColumn but it didnt work.

Please I need help once again from you guys.
Thanks

Jerry
 
In the after update event of the combo:

Me.OtherTextbox = Me.ComboName.Column(x)

where x is the appropriate column (which is zero based).
 
Thank you so much, it works.
Best Regards,

Jerry



In the after update event of the combo:

Me.OtherTextbox = Me.ComboName.Column(x)

where x is the appropriate column (which is zero based).
 
Hi jerry28ph, pbaldy and All!
This thread contains what I need to my project and tried to make use of it. But problems occurred... and please notice that I'm new to Access.
I tried to use Me.OtherTextbox = Me.ComboName.Column(x) without success. Access complains that it can't find the object Me. So my attempt to solve that was to give the name of the form instead of Me, just to see the same message. Could someone please tell me what's going wrong?
Take a look at the attachments to see what I've done.

Cheers!
 

Attachments

  • Combo1.GIF
    Combo1.GIF
    26.6 KB · Views: 141
  • Combo2.GIF
    Combo2.GIF
    51.6 KB · Views: 139
  • Combo3.GIF
    Combo3.GIF
    43.1 KB · Views: 133
Hi jerry28ph, pbaldy and All!
This thread contains what I need to my project and tried to make use of it. But problems occurred... and please notice that I'm new to Access.
I tried to use Me.OtherTextbox = Me.ComboName.Column(x) without success. Access complains that it can't find the object Me. So my attempt to solve that was to give the name of the form instead of Me, just to see the same message. Could someone please tell me what's going wrong?
Take a look at the attachments to see what I've done.

Cheers!

The problem is you are trying to put VBA code in the wrong spot (into a property). Put it in the VBA window instead. See here for a visual:
http://www.btabdevelopment.com/main/QuickTutorials/Wheretoputcodeforevents/tabid/56/Default.aspx
 
Bob!
Thanks very much for taking time, that saves me a lot of trouble shooting.

Salute to you! :-D
 

Users who are viewing this thread

Back
Top Bottom