By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,866 Members | 2,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,866 IT Pros & Developers. It's quick & easy.

creating a line break after 5 words

P: 3
Hi all, I've created a form with a memo field where enter text in an unformatted format. I would like to add a second field to the form which takes this text and forces a line break after five words, continues with a second sentence of 5 words, 3rd, etc. I've looked through the text string functions and some examples but I'm stuck.

Any suggestions would be greatly appreciated.

Don
Mar 25 '13 #1
Share this Question
Share on Google+
6 Replies


Rabbit
Expert Mod 10K+
P: 12,370
Please show us the code where you're stuck.
Mar 25 '13 #2

P: 3
Actually I'm looking for code examples that might work. Just aa beginner.

Thanks
Mar 26 '13 #3

Rabbit
Expert Mod 10K+
P: 12,370
This isn't a code writing service but if you post the code you've tried, we can help guide you to an answer.
Mar 26 '13 #4

P: 3
Not quite sure where to start so I will see if I can find an example.

Thanks so much for your help. What a useful forum.
Mar 26 '13 #5

Rabbit
Expert Mod 10K+
P: 12,370
Start with the code you've already tried. Post that and we can see where you went wrong. You said you already tried some string functions and examples so start by posting those.

Please hold the sarcasm. We are here to teach you to fish. Not give you fish. If you're not here to learn, then what are you here for?
Mar 26 '13 #6

P: 11
Expand|Select|Wrap|Line Numbers
  1. array1 = Split(memo field," ") 
  2. WRD_CNT = Ubound(array1) 
  3.  
  4. If WRD_CNT = 5 then
  5.    Response.Write "</br>"
  6. Else
  7. End If
Take a Start Counter of 1 and increment using For Loop..When Counter Reaches 5 make it 1 again..Put the above Code in the For Loop
Apr 5 '13 #7

Post your reply

Sign in to post your reply or Sign up for a free account.