Hi All,
i facing problem here, the following is my coding for move previouse recored.
'Open connection
ConnCust = New ADODB.Connection
Cust_String = "Provider=Microsoft.JET.OLEDB.4.0;data source=\\AAA\ABC.mdb"
ConnCust.Open(Cust_String)
'Open recordset from Customer List
RstCust = New ADODB.Recordset
Last_SQL = "SELECT * FROM CustomerList WHERE CustomerID <= " & lblCustID.Text & " ORDER BY CustomerID"
RstCust = ConnCust.Execute(Last_SQL)
With RstCust
If Not .EOF And Not .BOF Then
If RstCust("CustomerID").Value = lblCustID.Text Then
.MovePrevious()
If .BOF Then
MsgBox("Begining of record list!", vbExclamation, "Customer Entry Record")
.MoveFirst()
End If
End If
Call Retrieve_Data()
Else
.Close()
ConnCust.Close()
'load first record
Call Load_First_Saved_Record()
Exit Sub
End If
Call Record_Exist()
'Close recordset
.Close()
End With
'Close connection
ConnCust.Close()
'Dereference recordset and connection
RstCust = Nothing
ConnCust = Nothing
when i try to running the program there have error in
.MovePrevious() line. The error message are: -
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ABC.exe
Additional information: Operation is not allowed in this context.
can anyone help me in this? thanks.