S
SHIPP
I have tried checking for eof in various places in the following code.
However, I always get the 3021 error saying there is no current record. Any
help would be appreciated. I am using Access 2003.
While Not rs.EOF And lngID = rs("TrnID") And strTo =
rs("EmailAddress")
If rs.EOF Then
GoTo SendEmail
End If
If Not IsNull(rs("TrnHdr")) Then
strEMsg = strEMsg & rs("TrnHdr") & vbCr
End If
If Not IsNull(rs("TrnDtl")) Then
strEMsg = strEMsg & " " & rs("TrnDtl") & vbCr
End If
If Not IsNull(rs("TrnHdr")) Or Not IsNull(rs("TrnDtl")) Then
strEMsg = strEMsg & vbCr
End If
If rs.EOF Then
GoTo SendEmail
End If
rs.MoveNext
Wend
However, I always get the 3021 error saying there is no current record. Any
help would be appreciated. I am using Access 2003.
While Not rs.EOF And lngID = rs("TrnID") And strTo =
rs("EmailAddress")
If rs.EOF Then
GoTo SendEmail
End If
If Not IsNull(rs("TrnHdr")) Then
strEMsg = strEMsg & rs("TrnHdr") & vbCr
End If
If Not IsNull(rs("TrnDtl")) Then
strEMsg = strEMsg & " " & rs("TrnDtl") & vbCr
End If
If Not IsNull(rs("TrnHdr")) Or Not IsNull(rs("TrnDtl")) Then
strEMsg = strEMsg & vbCr
End If
If rs.EOF Then
GoTo SendEmail
End If
rs.MoveNext
Wend