[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Trying to select a value from a dataset.

Posted on 2011-02-11
7
Medium Priority
?
477 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 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 24

Author Comment

by:yo_bee
ID: 34874578
Attached is a screenshot Dataseet
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 24

Author Comment

by:yo_bee
ID: 34874789
@LSMConsulting

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

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 24

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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
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…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

830 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