I have a memo field capturing notes from dream study patients. We want to analyze the memo field in each record and produce a result that counts the number of occurrences of every single word for all records combined. I know ‘a’, ‘and’, ‘the’, etc. will appear a lot but we can exclude them from the final product. My challenge is how to count the total number of times each word appears.
Hmmmm???
Thanks!
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Word Counter (v2000)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Word Counter (v2000)
- This topic has 4 replies, 4 voices, and was last updated 19 years, 10 months ago.
AuthorTopicWSdashiell
AskWoody LoungerJune 16, 2005 at 12:45 am #420808Viewing 1 reply threadAuthorReplies-
WSjohnhutchison
AskWoody LoungerJune 16, 2005 at 6:54 am #953987You need a words table, with two fields word and count.
You could then use DAO code to loop through each of the records in your main table, parse the memo field into words, one word at a time and check the words table for this word. If it is present increment the count. If not add the new word to the table and set the counter to one.
post 488688 had some code that is broadly very similar, and could be modified to do the job you want.
-
WSHansV
AskWoody LoungerJune 16, 2005 at 10:46 am #954003I have attached a small demo. The module basParse contains a procedure WordFrequencies that takes two arguments: the name of the table and the name of the field whose word frequencies you want to count.
The code assumes that you have created a table tblWords with 2 fields: Word (text, size large enough to hold the longest word you expect to occur, 30 should be ample), and Frequency (number). Existing records will be removed at the beginning of the procedure. The code uses the VBScript regular expressions object to parse the field into individual words (defined as consisting of upper and lower case letters, digits and underscores).
The code uses DAO recordsets, so you need a reference to the Microsoft DAO 3.6 Object Library; if you prefer, you can easily adapt the code to use ADO instead of DAO.
The first procedure in the module, TestParse, runs WordFrequencies on the tblEmployees table (a stripped down version of the table in the Northwind database that comes with Access).
-
WSSupport4John
AskWoody Lounger -
WSdashiell
AskWoody Lounger
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Win 7 MS Essentials suddenly not showing number of items scanned. (Awaiting moderation)
by
Oldtimer
16 minutes ago -
France : A law requiring messaging apps to implement a backdoor ..
by
Alex5723
5 hours, 7 minutes ago -
Dev runs Windows 11 ARM on an iPad Air M2
by
Alex5723
5 hours, 56 minutes ago -
MS-DEFCON 3: Cleanup time
by
Susan Bradley
56 minutes ago -
KB5056686 (.NET v8.0.15) Delivered Twice in April 2025
by
lmacri
1 hour, 20 minutes ago -
How to enable Extended Security Maintenance on Ubuntu 20.04 LTS before it dies
by
Alex5723
17 hours, 9 minutes ago -
Windows 11 Insider Preview build 26200.5562 released to DEV
by
joep517
21 hours, 7 minutes ago -
Windows 11 Insider Preview build 26120.3872 (24H2) released to BETA
by
joep517
21 hours, 9 minutes ago -
Unable to eject external hard drives
by
Robertos42
35 minutes ago -
Saying goodbye to not-so-great technology
by
Susan Bradley
5 hours, 1 minute ago -
Tech I don’t miss, and some I do
by
Will Fastie
2 hours, 12 minutes ago -
Synology limits hard drives
by
Susan Bradley
2 days, 1 hour ago -
Links from Microsoft 365 and from WhatsApp not working
by
rog7
1 day, 3 hours ago -
WhatsApp Security Advisories CVE-2025-30401
by
Alex5723
2 days, 7 hours ago -
Upgrade Sequence
by
doneager
2 days ago -
Chrome extensions with 6 million installs have hidden tracking code
by
Nibbled To Death By Ducks
6 hours, 20 minutes ago -
Uninstall “New Outlook” before installing 2024 Home & Business?
by
Tex265
23 hours, 34 minutes ago -
The incredible shrinking desktop icons
by
Thumper
3 days, 4 hours ago -
Windows 11 Insider Preview Build 22635.520 (23H2) released to BETA
by
joep517
3 days, 6 hours ago -
Connecting hard drive on USB 3.2 freezes File Explorer & Disk Management
by
WSJMGatehouse
5 hours, 5 minutes ago -
Shellbag Analyser & Cleaner Update
by
Microfix
1 day, 15 hours ago -
CISA warns of increased breach risks following Oracle Cloud leak
by
Nibbled To Death By Ducks
3 days, 15 hours ago -
Outlook 2024 two sent from email addresses
by
Kathy Stevens
2 days, 19 hours ago -
Speeding up 11’s search
by
Susan Bradley
1 day, 3 hours ago -
HP Pavilion Will Not Wake Up After Being Idle for Longer Period
by
WSwalterwood44
1 day, 15 hours ago -
Make a Windows 11 Local Account Passwordless
by
Drcard:))
4 days, 5 hours ago -
Ubuntu 25.04 (Plucky Puffin)
by
Alex5723
4 days, 12 hours ago -
24H2 fixed??
by
CWBillow
3 days, 5 hours ago -
Uninstalr Updates
by
jv16
4 days, 18 hours ago -
Apple zero days for April
by
Susan Bradley
14 hours, 39 minutes ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.