| | |
combobox question
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2006
Posts: 14
Reputation:
Solved Threads: 0
Hi there,
i need some help as i'm new with using comboboxes
i have a table in a MS access database named "CUSTOMER" and in my vb form i have a combobox (name: cmb1). I want to display the names of my customers in my combobox when the form loads and when i search the combobox and select a particular person, i want the other values in the table to be displayed in textboxes......
any ideas please??? thank you very much
i need some help as i'm new with using comboboxes

i have a table in a MS access database named "CUSTOMER" and in my vb form i have a combobox (name: cmb1). I want to display the names of my customers in my combobox when the form loads and when i search the combobox and select a particular person, i want the other values in the table to be displayed in textboxes......
any ideas please??? thank you very much
hi
select cobobox and in right you will see the properties
1/datasource make its value the table in dataset you want
2/ ValueMember make its value the coulmn name (name of custeomer)
when your form load you fill dataset
now the list of comboBox has the names of ur customers
i hope this help
select cobobox and in right you will see the properties
1/datasource make its value the table in dataset you want
2/ ValueMember make its value the coulmn name (name of custeomer)
when your form load you fill dataset
VB.NET Syntax (Toggle Plain Text)
Me.DataSet11.Clear() Me.OleDbDataAdapter1.Fill(DataSet11)
now the list of comboBox has the names of ur customers
i hope this help
•
•
Join Date: Oct 2006
Posts: 14
Reputation:
Solved Threads: 0
hi and thanks for your reply. however i have been able to do that fill. my query is this.
I have 3 textboxes on my form.
when i select the item from the combobox i need the 3 textboxes to be filled with the data corresponding to that field. ( what i'm trying to say is that i have a table in macces with 4 rows, one of them is the field chosen in the combobox. now when i select the item i want the textboxes to display the latter of the record)
thanks
lukis
I have 3 textboxes on my form.
when i select the item from the combobox i need the 3 textboxes to be filled with the data corresponding to that field. ( what i'm trying to say is that i have a table in macces with 4 rows, one of them is the field chosen in the combobox. now when i select the item i want the textboxes to display the latter of the record)
thanks
lukis
hi:cheesy:
i used dataset and dataadptor for display the other data in text box
the sql query will be like this
then douple click in combobox and write this code (douple click means the code will excute when user select value )
i hope this what u want
manal
i used dataset and dataadptor for display the other data in text box
the sql query will be like this
VB.NET Syntax (Toggle Plain Text)
select email , name from customer where id =?
then douple click in combobox and write this code (douple click means the code will excute when user select value )
VB.NET Syntax (Toggle Plain Text)
'here you select the row from table with id that user choose from comboBox OleDbDataAdapter2.SelectCommand.Parameters("ID").Value = Me.ComboBox1.Text Me.DataSet21.Clear() Me.OleDbDataAdapter2.Fill(DataSet21) TextBox1.Text = DataSet21.Tables("customer").Rows(0).Item("email") TextBox2.Text = DataSet21.Tables("customer").Rows(0).Item("name")
i hope this what u want
manal
•
•
Join Date: Oct 2006
Posts: 14
Reputation:
Solved Threads: 0
thanks. listen i found this code but it's in c#... i need something that is exactly like this....but in vb.net 2003......
http://www.codeproject.com/csharp/combobox.asp
please help me
thank you for your co-operation
http://www.codeproject.com/csharp/combobox.asp
please help me
thank you for your co-operation •
•
Join Date: Oct 2006
Posts: 14
Reputation:
Solved Threads: 0
guys imagine i have this table
Rest_type Rest_name Tel Location
----------- ------------ --- ----------
ala carte del pinto 2345546 Dublin
pizzeria francesco's 3455667 Rome
now i have a form with a combobox (cbRests), and 2 textboxes (txtType, txtTel)
i have been able to include the Rest_name in the combobox but i need to fill in the textboxes with the relevant info...ex
when i select del pinto from the combobox, i want the textboxes to display ala carte and 2345546....how can i do that......in code please as i have no idea on how to do that.... thank you very much...your help is very much needed here
Rest_type Rest_name Tel Location
----------- ------------ --- ----------
ala carte del pinto 2345546 Dublin
pizzeria francesco's 3455667 Rome
now i have a form with a combobox (cbRests), and 2 textboxes (txtType, txtTel)
i have been able to include the Rest_name in the combobox but i need to fill in the textboxes with the relevant info...ex
when i select del pinto from the combobox, i want the textboxes to display ala carte and 2345546....how can i do that......in code please as i have no idea on how to do that.... thank you very much...your help is very much needed here
![]() |
Similar Threads
- Filling a ComboBox.... (Java)
- ComboBox Events (VB.NET)
- VB.NET ComboBox & Statusbar HELP! (VB.NET)
Other Threads in the VB.NET Forum
- Previous Thread: how to connect access with vb.net
- Next Thread: Suggestions Please (database)
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
"crystal .net .net2005 30minutes 2008 access application arithmetic array assignment basic binary bing box button buttons c# center code combobox component connectionstring convert data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dll dosconsolevb.net editvb.net error excel file-dialog firewall folder google hardcopy image images isnumericfuntioncall listview login math memory mobile ms mssqlbackend navigate net networking opacity output peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project record reports" save savedialog serial server sorting sql string studio temp text textbox timer toolbox updown upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf





