When I open the "New Customer Maintenance" form (where I could fill out the fields so that they get updated on the datagrid) I get this errror:
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
Here's the code:
VB Code:
Private Sub LoadData() Dim psql As String Set cnn = New ADODB.Connection cnn.Mode = adModeReadWrite cnn.Open ("INVENTORY") Set rec = New ADODB.Recordset rec.CursorType = adOpenKeyset rec.LockType = adLockOptimistic psql = "select * from tblCustomerInformation " psql = psql + " where CustNo = " + Trim(Str(Id)) rec.Open psql, cnn, , , 1 *Text2.Text = IIf(IsNull(rec!Fname), "", rec!Fname) Text1.Text = IIf(IsNull(rec!Lname), "", rec!Lname) Text5.Text = IIf(IsNull(rec!ContactNo), "", rec!ContactNo) Text8.Text = IIf(IsNull(rec!EmailAdd), "", rec!EmailAdd) Text14.Text = IIf(IsNull(rec!Birthday), "", rec!Birthday) 'Text9.Text = IIf(IsNull(rec!Gender), "", rec!Gender) Text9.Text = IIf(IsNull(rec!Address), "", rec!Address) Text13.Text = IIf(IsNull(rec!Comment), "", rec!Comment) End Sub
The line with the asterisk is highlighted when debugged.




Reply With Quote