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,

Edited by __avd: Correct [img] tag

6 Years
Discussion Span
Last Post by Skillzilog
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)

Edited by __avd: Added [code] tags.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.