hi friends,
i want to delete the record in between the data grid.can u suggest me how i will be able to do it.
i am sending the code
Private Sub delete_Click()
DataGrid1.AllowDelete = True
DataGrid1.AllowUpdate = True
If AdoRs.EOF Then
MsgBox "No more records in the file", , ""
Exit Sub
End If
AdoRs.delete
If Not AdoRs.EOF Then
AdoRs.Update
AdoRs.MoveNext
End If
DataGrid1.Refresh
End Sub
by using this code i am able to delete the first record in the database everytime but i want that as i select some record in between the datagrid with the record selector and press delete it will delete that record from the database
please suggest me some sol.
regards
ishikha
i want to delete the record in between the data grid.can u suggest me how i will be able to do it.
i am sending the code
Private Sub delete_Click()
DataGrid1.AllowDelete = True
DataGrid1.AllowUpdate = True
If AdoRs.EOF Then
MsgBox "No more records in the file", , ""
Exit Sub
End If
AdoRs.delete
If Not AdoRs.EOF Then
AdoRs.Update
AdoRs.MoveNext
End If
DataGrid1.Refresh
End Sub
by using this code i am able to delete the first record in the database everytime but i want that as i select some record in between the datagrid with the record selector and press delete it will delete that record from the database
please suggest me some sol.
regards
ishikha