Public Function getCrLF(memFld) As Integer
Dim pos As Integer
pos = 1
Do
If Nz(InStr(pos, memFld, vbCrLf)) = 0 Then
Exit Function
End If
pos = InStr(pos, memFld, vbCrLf) + 1
getCrLF = getCrLF + 1
Loop
End Function
SELECT getCrLF([memoFld]) AS CountReturnt
FROM tblmemo;
Public Function CountCRLF(mem As Variant) As Integer
CountCRLF = (Len(mem) - Len(Replace(mem, vbCrLf, ""))) / 2
CountCRLF = (Len(mem) - Len(Replace(mem, Chr(13) & Chr(10), ""))) / 2
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.