S
Steven Britton via AccessMonster.com
For some reason I get an error message saying there is no current record
and I hit debug it take me into the code and highlights the line in Case
Else .MoveNext??? The Value of the .EOF is True, why is it still in the
loop?
Option Compare Database
Option Explicit
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strDesc As String
Public Sub ParseECN()
Set db = CurrentDb()
Set rs = db.OpenRecordset("Import")
With rs
.MoveFirst
Do While Not .EOF
If InStr(1, !Field1 & "", ":") <> 0 Then
strDesc = Left(!Field1, InStr(1, !Field1, ":") - 1)
Else: .MoveNext
End If
Select Case strDesc
Case "Description"
MsgBox "here"
.MoveNext
Case Else
'ignore
.MoveNext
End Select
Loop
End With
End Sub
and I hit debug it take me into the code and highlights the line in Case
Else .MoveNext??? The Value of the .EOF is True, why is it still in the
loop?
Option Compare Database
Option Explicit
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strDesc As String
Public Sub ParseECN()
Set db = CurrentDb()
Set rs = db.OpenRecordset("Import")
With rs
.MoveFirst
Do While Not .EOF
If InStr(1, !Field1 & "", ":") <> 0 Then
strDesc = Left(!Field1, InStr(1, !Field1, ":") - 1)
Else: .MoveNext
End If
Select Case strDesc
Case "Description"
MsgBox "here"
.MoveNext
Case Else
'ignore
.MoveNext
End Select
Loop
End With
End Sub