You have to setup databasename,datasource of datagrod first!
Here's a simple coding!!
******************************
''This is for addition of new data
Dim init As String
Private Sub Command1_Click()
Data1.Recordset.AddNew
Text1.SetFocus
End Sub
''For modification
Private Sub Command2_Click()
Data1.UpdateRecord
End Sub
''For deletion
Private Sub Command3_Click()
Data1.Recordset.Delete
Data1.Recordset.MoveNext
If Data1.Recordset.EOF = True Then
Data1.Recordset.MovePrevious
End If
End Sub
''For searching of data
Private Sub Command4_Click()
Dim st As String
st = Text5.Text
Data1.Recordset.MoveFirst
Data1.Recordset.FindFirst ("Name = '" + st + "'")
'("Name = '"+st+"'"
' "Name" is the fieldname to be searched, "st" is searched for
If Data1.Recordset.NoMatch = True Then
Text5.Text = "No match for : " + st
Else
Data1.Recordset.OpenRecordset
End If
End Sub
End Sub
****************************