473,385 Members | 1,872 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,385 software developers and data experts.

How can i use valuemember and displaymember function in vb .net

vikassethia
i am using ms access back end and i want to diplay client name in combobox but when user select any client name then client id is save in database. So what can i do plz give me the solution of this one. I also using OleDb connection...........
Mar 29 '07 #1
3 2260
dip_developer
648 Expert 512MB
i am using ms access back end and i want to diplay client name in combobox but when user select any client name then client id is save in database. So what can i do plz give me the solution of this one. I also using OleDb connection...........

When adding user in the combobox add their name and with each item add a tag like....

myCombo.Items.Add("Client1")
myCombo.Tag="Client_id"

you can have this tag value in the SelectedIndexChanged event of your combo box....
Mar 29 '07 #2
When adding user in the combobox add their name and with each item add a tag like....

myCombo.Items.Add("Client1")
myCombo.Tag="Client_id"

you can have this tag value in the SelectedIndexChanged event of your combo box....
Thanks for replay but tell me how can i store id value in database. if i am using combo1.text theh it give error, so plz sugges me appropiate query for butten click event
Mar 30 '07 #3
dip_developer
648 Expert 512MB
Thanks for replay but tell me how can i store id value in database. if i am using combo1.text theh it give error, so plz sugges me appropiate query for butten click event
please post your code...
Mar 30 '07 #4

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

Similar topics

0
by: Dianna K | last post by:
I have a combo box which is set up as such: Me.cboGenre.DataSource = Ds.Tables("Genre") Me.cboGenre.ValueMember = "genre_id" Me.cboGenre.DisplayMember = "genre_description" The above loads...
2
by: Supa Hoopsa | last post by:
Working on a windows form, I am trying to bind a listbox to a dataset and want to set the displaymember & Valuemember properties of the listbox so that I can retrieve the selectedvalue from a...
1
by: Jim Heavey | last post by:
If you have a comboBox which has it's DisplayMember and ValueMenber bound to a datatable. If I know the "ValueMember" value - is there a way for me to set the index of the control to correspond...
0
by: Beringer | last post by:
I have implemented a combobox and have set the DataSource to an ArrayList. I next set the DisplayMember and ValueMember properties. When I run the code the combobox will display the proper text...
1
by: Bruce A. Julseth | last post by:
Does the ValueMember property in the ComboBox work like the DisplayMember property. For example, if I set the properties: comboBox1.DataSource = dataSet1;comboBox1.DisplayMember =...
1
by: Phill. W | last post by:
Am I missing something here? I have a simple class that exposes String properties called "Key" and "Description". I have a Control inherited from a ComboBox, into whose Items collection I've...
1
by: Bruce A. Julseth | last post by:
Sorry. The other post got sent before I was complete. Does the ValueMember property in the ComboBox work like the DisplayMember property. For example, if I set the properties: ...
2
by: Sam | last post by:
This code does not work : With m_frmCtrl.cboMode .DataSource = m_dsCtrl.Tables(4) .ValueMember = "ModeID" .DisplayMember = "Description" .SelectedValue =...
5
by: Spam Catcher | last post by:
Hello all, I can't seem to set the value member properly in code... I'm using a ComboBox in DropDownList mode: Private Class ApplicationsComboBoxItem Private _Name As String Private...
5
by: =?Utf-8?B?QmVu?= | last post by:
How would you add an item with its DisplayMember and ValueMember without binding to a datatable or dataview like: listbox.DisplayMember = "name"; listbox.ValueMember = "recid"; listbox.DataSource...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.