Count individual words in a text field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text field containing names eg: Maree Jane Louise
and I want to count how many words there are in each field.

Can anyone help me out?

Thanks
 
I presume you mean the text field is in a table.

Create a query that includes the text field. Put the following expression in
a blank field in the query:
NumOfWords:Len([MyTextField])-Len(Replace([MyTextField]," ","")) + 1
 
Brilliant! Thank you very much the expression you gave works perfectly.

Cheers
Pauline

PC Datasheet said:
I presume you mean the text field is in a table.

Create a query that includes the text field. Put the following expression in
a blank field in the query:
NumOfWords:Len([MyTextField])-Len(Replace([MyTextField]," ","")) + 1


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com




sherre said:
I have a text field containing names eg: Maree Jane Louise
and I want to count how many words there are in each field.

Can anyone help me out?

Thanks
 
Back
Top