Solved

Trying to select a value from a dataset.

Posted on 2011-02-11
7
441 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 22

Author Comment

by:yo_bee
ID: 34874578
Attached is a screenshot Dataseet
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 22

Author Comment

by:yo_bee
ID: 34874789
@LSMConsulting

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

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 22

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

911 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

25 Experts available now in Live!

Get 1:1 Help Now