character count in form

  • Thread starter Thread starter Lee-Anne Waters via AccessMonster.com
  • Start date Start date
L

Lee-Anne Waters via AccessMonster.com

hi,

i have a form which sends out a text message to a mobile phone(cell phone)
and you are limited to 140 characters for each message

is there a way to have a field below the message field that counts the
number of characters entered as you type?

thanks for your help

Lee-Anne
 
there is an example of how to do this somewhere in the database templates
provides with access, it is do with the keypressed event and show event
histry, i have used this to store the key storked key by key into a table
previously
 
try

Me!MyTextCount = Len(RTrim(Me!MyMessage.Text))

change the control names to your message control, and "show char count"
control, of course. put the code in the Change event procedure and the Exit
event procedure of the message control.

if the text message being sent to the cell phone will automatically include
any trailing spaces entered at the end of the message, then don't use the
RTrim() function. instead, just use

Me!MyTextCount = Len(Me!MyMessage.Text)

hth
 
Back
Top