When I select from a combo box that runs this code I am getting an "Either BOF or EOF is true or the current record has been deleted. What is causing this???
If oRS.State <> adStateOpen Then
oConn.Close
Set oConn = Nothing
Exit Sub
Else
oRS.MoveLast
oRS.MoveFirst
If oRS.RecordCount > 0 Then
'String fields
Me.cmbtype = oRS!FABRIC_TYPE_DESC
Me.txtDescription = oRS!FABRIC_DESC
End If
End If
oRS.Close
Set oRS = Nothing
oConn.Close
Set oConn = Nothing
DoEvents
Exit Sub
'Me.Requery
ErrHandler:
Call ErrorHandler
If oRS.State <> adStateOpen Then
oConn.Close
Set oConn = Nothing
Exit Sub
Else
oRS.MoveLast
oRS.MoveFirst
If oRS.RecordCount > 0 Then
'String fields
Me.cmbtype = oRS!FABRIC_TYPE_DESC
Me.txtDescription = oRS!FABRIC_DESC
End If
End If
oRS.Close
Set oRS = Nothing
oConn.Close
Set oConn = Nothing
DoEvents
Exit Sub
'Me.Requery
ErrHandler:
Call ErrorHandler