Accessing "write buffer" with VBA

T

Tim Demijohn

I'm attempting to read the number of characters in a bound
memo field in a form. I can use the len() function when I
enter the field and after I leave the field, but I cannot
count the characters during a user update. How can I
access the temporary buffer area that Access uses to count
(use the len function)? (any other ideas to solve this
problem are welcome.)
 
D

Dirk Goldgar

Tim Demijohn said:
I'm attempting to read the number of characters in a bound
memo field in a form. I can use the len() function when I
enter the field and after I leave the field, but I cannot
count the characters during a user update. How can I
access the temporary buffer area that Access uses to count
(use the len function)? (any other ideas to solve this
problem are welcome.)

I *think* what you are after is the length of the displayed text in the
field while the user is updating it, as for example in an event
procedure for the Change event. This is available via the control's
Text property, which can only be accessed while the control has the
focus. So, given that the control has the focus, you can get the length
of the text as it is edited with

Len(Me!txtMyMemoField.Text)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top