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

Dropdown Problem

Hi all,

I have a problem: i want a full table of a Access DB in a Dropdown list. In the database, there is one table with index, name,
telephonenumber.

I have the OleDB Adapter & Dataset, but now i dont know how i can get this stuff into the dropdown, and i also dont know, if the
dropdown can manage more than 1 element.

Usually anyone can help me.

Thx,
Michael

PS: After this problem, i must know, how i can get the selected telephonenumber into a variable.

Nov 21 '05 #1
2 1069
Hi,

Add a new calculated column to your dataset. Use that column as the
displaymember in the combobox.
Dim dc As DataColumn

'

' Add a new column in clients table which

' is full name.

dc = New DataColumn("DisplayInfo")

dc.DataType = System.Type.GetType("System.String")

dc.Expression = "Index + ' ' + Name + ' ' + telephonenumber"

dsClient.Tables(0).Columns.Add(dc)

Ken

--------------------
"Kreuzer Michael" <ze*******@aon.at> wrote in message
news:2u*************@uni-berlin.de...
Hi all,

I have a problem: i want a full table of a Access DB in a Dropdown list. In
the database, there is one table with index, name,
telephonenumber.

I have the OleDB Adapter & Dataset, but now i dont know how i can get this
stuff into the dropdown, and i also dont know, if the
dropdown can manage more than 1 element.

Usually anyone can help me.

Thx,
Michael

PS: After this problem, i must know, how i can get the selected
telephonenumber into a variable.
Nov 21 '05 #2
Hi,

Add a new calculated column to your dataset. Use that column as the
displaymember in the combobox.
Dim dc As DataColumn

'

' Add a new column in clients table which

' is full name.

dc = New DataColumn("DisplayInfo")

dc.DataType = System.Type.GetType("System.String")

dc.Expression = "Index + ' ' + Name + ' ' + telephonenumber"

dsClient.Tables(0).Columns.Add(dc)

Ken

--------------------
"Kreuzer Michael" <ze*******@aon.at> wrote in message
news:2u*************@uni-berlin.de...
Hi all,

I have a problem: i want a full table of a Access DB in a Dropdown list. In
the database, there is one table with index, name,
telephonenumber.

I have the OleDB Adapter & Dataset, but now i dont know how i can get this
stuff into the dropdown, and i also dont know, if the
dropdown can manage more than 1 element.

Usually anyone can help me.

Thx,
Michael

PS: After this problem, i must know, how i can get the selected
telephonenumber into a variable.
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
1
by: news | last post by:
Hello, I need help with the following problem: An HTML page that have two dropdown list whit different values: 1. Dropdown list 1(tblname1) =values with different location's. After user...
2
by: ahoodless | last post by:
hi i have a problem that I have tried desperately to tackle but cannot seem to complete. basically i am trying to create a form with three dropdown lists, the tricky part is i want the 3rd drop...
0
by: Manish | last post by:
Hi All, I'm having this problem I hope someone can help provide a solution for it :) I've this dropdown list box in a usercontrol which I'm populating from the database (it's viewstate property...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
2
by: Brian | last post by:
Hi, All, I have two dropdown lists in itemtemplate in a datagrid. for example, dropA and dropB. also, for the dropdown, I set < Runat="server" AutoPostBack="True" OnSelectedIndexChanged="some...
3
by: devNorway | last post by:
I have been struggling with a problem for days now, and searched for related problems and solutions but had no luck. I have two dropdown listboxes where the first is populated in page load and...
2
by: William Youngman | last post by:
We are developing an application that presents data to the user in a gridview and we are using the dropdown extender to give the user a SharePoint 2007 type dropdown menu attached to the cells of a...
13
by: Shutey | last post by:
I have a strange issue with dropdowns. Using php4, mySQL5, Apache 2 on a fast XP pro PC, I have a form which requires 5 dropdowns populated with indentical values. I extract the values using SQL...
5
by: abhi3211 | last post by:
i am using java inside java script page. in that page i want to use two dropdown list. in first dropdown list i am getting data from ms-access database. in second dropdown list i want to get data...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
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...
0
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
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...
1
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....
0
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 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.