Private Sub Command1_Click()
VB Code:
Dim objConn As ADODB.Connection Set objConn = New ADODB.Connection objConn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\database\DB.mdb;Persist Security Info=False") Dim x As String dim rs1 as adodb.recordset Set rs1 = New ADODB.Recordset x = " delete from data where inv ='" & Form29.Text1 & "'" rs1.Open x, objConn If rs1.EOF Then MsgBox ("INVOICE NOT FOUND") Else MsgBox ("INVOICE DELETED") Form30.Visible = False End If End Sub
when i run the above coe it gives error at line rs1.eof.. that operation can not be done when object is closed
tell me what is the problem




Reply With Quote