Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select from a combobox using listbox column 5 as criteria??

Status
Not open for further replies.

Event2020

Technical User
Sep 17, 2001
12
GB
Hello,

I am using access2000 and I have a combo box [cmbProduct] on a form that is based on a lookup field [productID] in a table called [tblLines]. I also have on the same form a listbox called [lsbFound] and i want to use column 5 to select from the combo box.

In other words, when the user selects a item in the list box, what ever data is in column 5 is entered into the combo box as if the user was typing it themselves (this would happen on the double click event).

Can anyone tell me how to do this please, thank you for your time.

Event2020
 
Yep
you need to add another new text box.
In the List boxes After_update event add this

Me!newTextbox = Me!List1.column(5)

In the query refer to the new text box instead.
=Me!newTextbox

when it's working, make "Visible" propery on the Me!newTextbox "False" so the text box won't show.

DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Just a small correction to Doug's post:

Use
Code:
column(4)
to find the 5th column instead. The column count is zero relative......
 
Hi Doug and Cosmo,

Just a note to say thank you to you both - it works perfect now, I appreciate your help.

Regards,

Event2020
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top