Inherits System.Windows.Forms.Form
    Dim bill As New POS
    Dim mypath = Application.StartupPath & "\db1.accdb"
    Dim connection As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=d:\db1.accdb;Persist Security Info=False;")
    Dim cmd As OleDbCommand
    Dim cmdGetIdentity = New OleDbCommand()
    Dim sql2 As OleDbDataAdapter = New OleDbDataAdapter("Select * from customer", connection)
    Dim db1 As DataSet = New DataSet
    Dim db2 As New DataTable

    Private Sub verification_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        sql2.Fill(db1, "customer")
        DataGridView1.DataSource = db1.Tables(0)
        DataGridView1.ReadOnly = True
        DataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect
        DataGridView1.MultiSelect = False

gurus, i want to apply a technique, where, if a user double clicks a row in a data grid, it will go to the TEXTBOXES ABOVE, what code i will add on it? please enlighten me


it is the data grid, and if the user click one of that,

it will go here,

Private Sub DataGridView1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.DoubleClick
Dim cmd2 As Integer
        cmd2 = DataGridView1.Item(DataGridView1.CurrentRow, 0)
        Dim Sql = "Select * From Customer"
        cmd = New OleDbCommand(Sql, connection)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.