Solved

Trying to select a value from a dataset.

Posted on 2011-02-11
7
429 Views
Last Modified: 2013-11-05
I have a very basic Windows form that has a connection to a mdb.

I am able to get mu search to work, but once complete I would like to select a value to pass to another function.


Imports System
Imports System.Data
Imports System.Data.OleDb

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'ComputerInverntoryDataSet.Group_computers' table. You can move, or remove it, as needed.
        'Me.Group_computersTableAdapter.Fill(Me.ComputerInverntoryDataSet.Group_computers)

    End Sub



    Private Sub EnterBtn(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.click
        Try
            Me.Group_computersTableAdapter.FillByUserName(Me.ComputerInverntoryDataSet.Group_computers, TextBox1.Text)
        Catch ex As System.Exception
            System.Windows.Forms.MessageBox.Show(ex.Message)
        End Try

    End Sub



End Class

Open in new window

0
Comment
Question by:yo_bee
  • 4
  • 2
7 Comments
 
LVL 84
ID: 34874521
Select a value from where? If this is on a form, does the user enter/select that value, or are you trying to get to it from a Dataset or something of that nature?

0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 250 total points
ID: 34874567
0
 
LVL 21

Author Comment

by:yo_bee
ID: 34874578
Attached is a screenshot Dataseet
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 21

Author Comment

by:yo_bee
ID: 34874789
@LSMConsulting

Yes I am trying to get this from a dataset.
0
 
LVL 21

Accepted Solution

by:
yo_bee earned 0 total points
ID: 34874919
I figured it out with some ideas from the  link

http://mka-soft.com/how-to/29-how-to-display-master-detail-vb-net

The the way I got it to work was to drag one of the columns from the table to the form.
When I select a row the text field populates with the proper value.

0
 
LVL 84
ID: 34874933
Does the user select an item somehow? Is that a DataGridView? If so, are you trying to get the value of one of the Columns in that DataGridView for the currently selected row?
0
 
LVL 21

Author Closing Comment

by:yo_bee
ID: 34904861
From the link from CodeCruiser shed some light on the subject and I was able to apply what I saw.

Thanks
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Query output to Excel producing error 7 37
Access 2016 Merge Tables 8 28
Resize text 4 16
Help with SQl and UNION 7 0
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now