yo_bee
asked on
Trying to select a value from a dataset.
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.
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
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?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@LSMConsulting
Yes I am trying to get this from a dataset.
Yes I am trying to get this from a dataset.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?
ASKER
From the link from CodeCruiser shed some light on the subject and I was able to apply what I saw.
Thanks
Thanks