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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

value from combobox

Status
Not open for further replies.

maro009

Programmer
Joined
Mar 16, 2006
Messages
4
Location
BE
hi

i have a combobox
row source is :
SELECT Customer.Customer_id, Customer.CustomerName FROM Customer ORDER BY [CustomerName];

now how can i return the customer_id from the selected row

example combobox

customerID | customername
1 | mike
2 | Kyle
3 | Rita

now i want have a varaible assigned to the selected customer id

how can i do this ?
thx
 
I guess you're with msaccess, don't you ?
Have a look at the BoundColumn property of the ComboBox object.
Set this property to 1 (one) and then:
yourVar = Me![your combo].Value

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top