Saturday, 15 March 2014

sql - Access 2010 set variable to single field of a table -


I think it should be easy, but I am unable to provide a clear answer for it after searching.

I have a user table that contains email addresses.

I have a combo box that references this table.

All I want to do, the email address field of the selected user is set in the string, so I can work with it.

Just trying to get the string back from a SQL query such as:

  "Select tblUsers from the email address WHERE id =" & amp; Me.cmbUser.Value & amp; Can anyone tell me in the right direction? 

You can use the combo box to return to the email address after user selected user from the list Are there.

Assume your users that user and email area

set your combo box property:

1.Row source = SELECT users, email from Tblusers < / P>

2.Column count = 2

3.Bound column = 0 (0 is the first column and 1 is the second column which is the email)

4. Column Width = X "; 0" (x is your compass box width)

You can get an email address from me.combobox.column (1). Both the me.combobox.value and me.comboxbox.column (0) users selected


No comments:

Post a Comment