473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

text box to display combo column not key column

135 100+
I have a text field that I want to display the name that is chosen in a combo box (=[Combo12]). Unfortunately the text box is only displaying the number of the record in the key column. What do I have to do to have it show what is in column 2 of the combo box instead of column 1?
Oct 24 '10 #1
4 1782
The combobox uses the key column to look up the correct values to place in the box. Therefore, you need to do the same thing. This is most easily done using the dlookup function like so:
syntax: DLookup(Expression, Domain , Criteria)
Expand|Select|Wrap|Line Numbers
  1. =dlookup("[ColumnYouWant]","[YourTable]","[KeyColumn] = [Combo12]")
Let me know if this helps.
Oct 24 '10 #2
mshmyob
904 Expert 512MB
Try using the column property of the combo box.

Me.cboBox.column(1) would give you the column info you want.

Me.cboBox.Column(0) is what you are getting

See if that helps.

cheers,
Oct 25 '10 #3
MyWaterloo
135 100+
Thanks mshmyob, that worked great!
Oct 28 '10 #4
mshmyob
904 Expert 512MB
You're welcome. Good luck with the rest of your project.

cheers,
Oct 28 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: Christopher Subich | last post by:
As a hobby project, I'm writing a MUD client -- this scratches an itch, and is also a good excuse to become familiar with the Python language. I have a conceptual handle on most of the...
1
by: Daniel Hill | last post by:
OK, I have very, VERY basic background knowledge of VB6 and have now upgraded to VB.NET and now I'm struggling to bring up the forms I want. What I am looking to do is to have a click a command...
1
by: Napo | last post by:
Hi i have about twenty columns displayed in a datagrid,and the first column is "EmployeeID" column.Now,i want to display the "EmployeeID" column awalys when i drag the datagrid's scrollbar.What can...
0
by: TT (Tom Tempelaere) | last post by:
Hi, I have made my custom combo box column based on several articles (http://msdn.microsoft.com/smartclient/community/wffaq/ctrlsp.aspx & other articles). I derived the custom column from...
3
by: Hans Merkl | last post by:
Hi, I was wondering if it's possible to bind the header text of a GridView column to a method of an object I have. At the moment I am setting the header texts in Page_Load but I was wondering if...
5
by: eholz1 | last post by:
Hello Group, I am developing a web site using CSS. I have a div that has a vert scroll bar in it. The div works just fine (scroll up and down, etc). I have regular text (using <ptags) in the...
7
by: jediknight | last post by:
Does anyone know of any examples of doing LED style text displays? I need to implement a text display which has one line of 20 characters. There was an example on Codeproject but I cannot seem...
0
by: Greg Smith | last post by:
I would like to assign the value of a column to the text of the 'Select' column. i.e. In stead of 'Select' it would have the value in the column. Is this do-able? Any help is greatly...
1
by: Valli | last post by:
Hi, I need to display an hyperlink column in gridview where if the user clicks that column the page should move to the selected page. I have got help from this group & started using template...
1
by: hexleena | last post by:
I have 2 tables - Master plan table and detail table. The plan number is unique in Master plan table and repeats in detail table. There is another column in detail table called planrefnumber that is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.