> freg do i put MsgBox =Len([Fieldname])-Len(Replace([FieldName]," ","")) to
> count the number of spaces between the words in a text box? I just want to
[quoted text clipped - 9 lines]
>> "This is my text."
>> 3
Do you wish a message to appear after a user finishes entering the
text in the control?
if so, code the control's (into which the user is typing the text)
AfterUpdate event:
MsgBox "You entered " & Len([FieldName])-Len(Replace([FieldName],"
","")) & " spaces."
If you wish to know how many words were typed then:
MsgBox "You entered " & Len([FieldName])-Len(Replace([FieldName],"
","")) + 1 & " words."

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
JudithSpurlock - 29 Mar 2007 21:14 GMT
Fredg I guess i didn't explain the whole process because it wouldn't fit in
the search area. the program is supposed to allow a user to enter multiple
lines in a text box. and in the click event of the command button, use a for
loop and the Len function to iterate through each character in the text box.
Every time a space character is found, increment a procedure-level variable
by 1. after the loop has completed, output the number of spaces found in a
message box. how would i do that. I'm really unsure about this. Judith
Spurlock
> > freg do i put MsgBox =Len([Fieldname])-Len(Replace([FieldName]," ","")) to
> > count the number of spaces between the words in a text box? I just want to
[quoted text clipped - 22 lines]
> MsgBox "You entered " & Len([FieldName])-Len(Replace([FieldName],"
> ","")) + 1 & " words."