Word count of memo in query?

BonnieG

Registered User.
Local time
Today, 12:48
Joined
Jun 13, 2012
Messages
79
Hi everyone

I have a database which receives nominations for an awards ceremony. I would like to filter these nominations using a query which shows only the nominations which meet a certain word length (>500).

Currently, I have this as my query, but I realised this is actually filtering based on 500 characters rather than words.

Code:
SELECT nominations.nomination, Len([nomination]) AS MemoLength
FROM nominations
WHERE (((Len([nomination]))>500));

Any ideas for how to change this to words instead?

Many thanks! :)
 
You could count the number of spaces as a start.
 
i think:
NumWords: Len([nomination] & "") - Len(Replace([nomination] & ""," ","")) + 1
 
will return correct if there is only single space on each word and there is text in the memo field.
 
It only needs to be a rough estimate so that's perfect for my needs. Thanks!
 
your welcome sir!
 

Users who are viewing this thread

Back
Top Bottom