Tuesday, October 1, 2019

How to use DataGrid1.Columns.Item(0) Display Data/Delete in Visual Basic 6 and MS Access

Here is a sample program that is being provided by my close friend, business partner and fellow software engineer Sir Larry Dave Emol. He created this program using Microsoft Visual Basic 6 and Microsoft Access to use DataGrid1.Columns.Item(0) Display Data/Delete. This simple application will help you how to use DataGrid1.Columns.Item(0) in Vb6 you can change  0 it depends on the datafields number in database

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.


My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.


My personal website is http://www.jakerpomperada.com.





Sample Program Output

Program Listing


DISPLAY

Private Sub DataGrid1_Click()
On Error Resume Next
Me.txtID.Text = Me.DataGrid1.Columns.Item(0)
Me.Text1.Text = Me.DataGrid1.Columns.Item(1)
Me.Text2.Text = Me.DataGrid1.Columns.Item(2)
Me.Text3.Text = Me.DataGrid1.Columns.Item(3)
Me.Text4.Text = Me.DataGrid1.Columns.Item(4)
End Sub

DELETE 

Private Sub Command3_Click()
On Error Resume Next
 Call SQLDB(Me.AdoCon, "Select * from tblInfo where ID like'" & Me.DataGrid1.Columns.Item(0).Text & "'")
             Me.AdoCon.Recordset.Delete
             Me.AdoCon.Refresh
             Me.Text1.Text = ""
             Me.Text2.Text = ""
             Me.Text3.Text = ""
             Me.Text4.Text = ""
             Me.txtID.Text = ""
End Sub








No comments:

Post a Comment