?
Solved

Trying to select a value from a dataset.

Posted on 2011-02-11
7
Medium Priority
?
471 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 85
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 1000 total points
ID: 34874567
0
 
LVL 23

Author Comment

by:yo_bee
ID: 34874578
Attached is a screenshot Dataseet
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 23

Author Comment

by:yo_bee
ID: 34874789
@LSMConsulting

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

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 85
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 23

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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

762 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