I'd try the Replace function;-)
[tt]public function charcount(varString as variant, _
optional strReplace as string = "<") as long
if len(strString)>0 then
charcount=len(strString)-len(replace(strString, strReplace,""))
else
charcount=0
end if
end function[/tt]
If strString is "This < is < a < test" and strReplace is "<", a form control should show 3 with the following controlsource
=charcount(txtText)
If you need to count other characters, just alter the parameter to for instance
=charcount(txtText,"|")
Roy-Vidar