thank you in advance for any and all assistance.
I'm trying to populate a combobox with a table in VB.Net.
Table Name: tblBreed
cboBreed
Thank you again.
Michael 8 7305
Hi Micheal,
I think you get a lot of answers, because this is simple in vb.net
cbobreed.datasource = tblBreed
cbobreed.displaymember = "MyTableText"
cbobreed.valuemember = "Mytablevalue"
I hope this helps?
Cor
Hi,
cboBreed.DataSource=tblBreed
cboBreed.DisplayMember = "FieldNameToDisplay"
Ken
--------------
"Lumpierbritches" <lu*************@aol.com> wrote in message
news:20***************************@mb-m28.aol.com... thank you in advance for any and all assistance.
I'm trying to populate a combobox with a table in VB.Net.
Table Name: tblBreed cboBreed
Thank you again.
Michael
I get this when I put this in the Form Load Event:
System.Data.DataViewManagerListItemTypeDescriptor
Hi Lumpier.....
cbobreed.displaymember = "MyTableText"
cbobreed.valuemember = "Mytablevalue"
Did you use that "MyTableText" or the name from the column in your table (or
said in another way, the column (item) name in the database)?
(It has to be between quotes)
The valuemember is not necessary if you do not use it.
I hope that it will work now?
Cor
I'm too dense to understand. I've tried in the cboBreed event change, and in
the formload event to load the values in table breed into my combo box and all
I get is
System.Data.DataViewManagerListItemTypeDescriptor
HELP!!! I'm gettting so frustrated. In VB6, there was a data combobox that
allowed for data porting to the combobox and a wizard for idiots like me.
Hi,
You probably have the column name wrong. Try this.
cboBreed.DataSource=tblBreed
cboBreed.DisplayMember = tblBreed.Columns(0).ColumnName
Ken
------------------
"Lumpierbritches" <lu*************@aol.com> wrote in message
news:20***************************@mb-m25.aol.com... I'm too dense to understand. I've tried in the cboBreed event change, and
in the formload event to load the values in table breed into my combo box and
all I get is
System.Data.DataViewManagerListItemTypeDescriptor
HELP!!! I'm gettting so frustrated. In VB6, there was a data combobox that allowed for data porting to the combobox and a wizard for idiots like me.
Ken,
Thank you for your assistance. I can get the first, "selected" value, but I
still can't populate the combobox with the values in the table. Here is my
complete code:
Private Sub frmAnimal_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
AnimalDA.Fill(Animal1, "tblAnimal")
BreedDA.Fill(Breed1, "tblBreed")
End Sub
Private Sub cboBreed_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles cboBreed.SelectedIndexChanged
cboBreed.DataSource = Breed1.tblBreed.Columns(0)
End Sub
I did not see Ken today.
"> Private Sub frmAnimal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AnimalDA.Fill(Animal1, "tblAnimal") BreedDA.Fill(Breed1, "tblBreed")
cboBreed.DataSource = Breed1.tables("tblBreed")
cboBeed.displaymember= Breed1.tables("tblBreed").Columns(0) End Sub
I asume you did the rest using the designer (wizards)
This is almost as Ken wrote.
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Big Time |
last post by:
Hi,
I have a question regarding using drop down lists and how to get them to
limit the list of a subsequent field. I have a database which has the names
of colleges. Each college has it's own...
|
by: Roy Padgett |
last post by:
I have a combo box where users select the customer name and can either
go to the customer's info or open a list of the customer's orders.
The RowSource for the combo box was a simple pass-through...
|
by: Geoff Portbury |
last post by:
I'm a swimming club coach.
I have a data base for recording times at various meets.
I have a FORM for entering times called SWIM TIMES.
When I enter the swimmers name ID, eg FOR01 for Doug Ford I...
|
by: Nicolae Fieraru |
last post by:
Hi All,
Could somebody provide me step by step instructions of how to populate a
combobox with values from a table (any table from northwind.mdb will do).
What I have done is:
- I added on the...
|
by: Henry |
last post by:
I have a dataset dsMain in which I have two tables
The table period has columns like period_id, name, root_org_id....
The table organization has org_id, name, parent_id, hier_path, level,...
|
by: John Ninan |
last post by:
I am creating Dynamic Usercontrol in Asp.net application. In this application
I have a combobox(aspx Page). Which contains various items. Based on item
selected I am dynamically populating...
|
by: Bill Brinkworth |
last post by:
in vb.net 2005, i would like to pull up a name from a database (customers) (i
can do this already), then after a name is selected from a combox box, to
populate the form's text boxes with with data...
|
by: c_shah |
last post by:
I am a beginner and learning VB.net
There are two wasy to bind a combobox or a listbox
First approach is to assign a datasource and displaymember
Second approach is to iterate through datarow...
|
by: davenumber40 |
last post by:
I’m creating a small database in Access 2003(XP) to track issues during software testing. As far as databases go, it’s going to be a relatively small, short term project (No more than 20,000 records...
|
by: buterfly0707 |
last post by:
hi..
i want to fill my combobox from the values which im having in my table in the database. and my combobox name is combobox1 and my table is tblDetails, and this table having two columns code...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |