473,508 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB2005Express: providing values from table for dropdown combo?

Hi All,

I'm very new to VB.Net, and I've recently downloaded VB 2005 Express.
I've managed to connect a dataset to my installation of SQLExpress2005
and I have a form on which I have fields that display data from my
table as I scroll through the recordset.

I want to have a dropdown combobox on that form that stores the value
selected in the dataset of the other fields on the form, but which
displays the dropdown values from a different SELECT statement.

So, something like "SELECT DISTINCT projname FROM tblProjects ORDER BY
projname ASC".

I've been scanning through the help for hints but can't find anything
that shows me how to use a second recordset on a form.

Can anyone give me any pointers?

Much warmth,

planetthoughtful
---
"Lost in thought"
http://www.planetthoughtful.org

May 10 '06 #1
1 944
Hi,

May I assume that you have instead of a recordset a Dataset or a DataTable
and probably code to get that one?

With a recordset you have first to use the conversion to a datatable to let
it work well. (There is an overloaded method from the dataadapter for that).

Cor

<pl**************@gmail.com> schreef in bericht
news:11*********************@v46g2000cwv.googlegro ups.com...
Hi All,

I'm very new to VB.Net, and I've recently downloaded VB 2005 Express.
I've managed to connect a dataset to my installation of SQLExpress2005
and I have a form on which I have fields that display data from my
table as I scroll through the recordset.

I want to have a dropdown combobox on that form that stores the value
selected in the dataset of the other fields on the form, but which
displays the dropdown values from a different SELECT statement.

So, something like "SELECT DISTINCT projname FROM tblProjects ORDER BY
projname ASC".

I've been scanning through the help for hints but can't find anything
that shows me how to use a second recordset on a form.

Can anyone give me any pointers?

Much warmth,

planetthoughtful
---
"Lost in thought"
http://www.planetthoughtful.org

May 10 '06 #2

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

Similar topics

2
1551
by: Dan Cook | last post by:
Ok... here's the scoop... I've got an unbound form with Serial Number, Building, and Room... all this is in tableA... Now I've got the form setup with building, room and serial number as combo...
2
1760
by: givlerj | last post by:
I need some help. Here is a little background, I support a MS Access 2k DB (SQL Server 2k backend) that has courses and students. The problem form lets the user pick a course from a drop down and...
7
23521
by: NCrum | last post by:
I want to set the Default value of a Combobox for any changeable record and have got this working but it is totaly unsatisfactory see the code below I loop through the items in the Combo looking...
6
4429
by: Sebi | last post by:
Hello all, I'm thinking about overwriting the ListItem, so it can contain x additional values (not only one). Has anybody ever tried this? Has someone got an example (C#)? Can DropDownList...
3
2107
by: Brian Graham | last post by:
I have a combo box with a query for a list of names etc. The table has 250,000 rows. The query returns 250,000 rows. But the list returns only 97,000 rows and then shows blank columns after that, so...
2
7512
by: dancole42 | last post by:
So I have a subform that lists the various items on a particular invoice. First, the user selects a product class from the Class dropdown. This is bound to the Class field in the InvioceLines...
2
7016
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small...
2
1755
by: ARC | last post by:
I'm testing a user's db that contains a very large number of records. I have an invoice screen, with an invoice select dropdown box that shows all invoices, and the customer's name, etc. With...
4
2456
by: Karl | last post by:
Using A2000 with 2 tables Table 1 is a reference table with 2 fields Table 2 has 2 fields and 2 combo boxes to lookup date in table 1 Combo1 binds to col 1 in table 1, this works OK Combo 2...
0
7223
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
7114
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
7377
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...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.