ok i have tried and everything is working like a charm like Add NewRecord and delete .try the following way ! .
Code:Option Explicit Private Sub btAddnew_Click() Adodc1.Recordset.AddNew Adodc1.Recordset.Fields("IPID") = TXTIP.Text Adodc1.Recordset.Fields("IPNAME") = TXTIPDETAIL.Text Adodc1.Recordset.Update End Sub Private Sub btDelete_Click() Adodc1.Recordset.Delete End Sub Private Sub Form_Load() With Adodc1 .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\JoseProject\ServerMaintenance.mdb;Persist Security Info=False" .RecordSource = "Select * from StoreServersDetail" End With Set TXTIP.DataSource = Adodc1 Set TXTIPDETAIL.DataSource = Adodc1 TXTIP.DataField = "ipid" TXTIPDETAIL.DataField = "ipName" End Sub![]()




Reply With Quote