MikeJohnB wrote in message
<
[email protected]> :
I have perhaps a tendency of being a bit direct, but I feel that this
exchange of view wouldn't necessary if paing attention to the details
in
my initial reply. Please correct, if I've misunderstood. Some comments
inline.
Roy
You mistake my intension entirely, I don't know enough about access to make
rude comments so I will try again to explain what "I" feel is required.
As the guy types, he wants the Txtbox to indicate the number of charaters
that he has entered to date dynamically. Type the letter t, the txtbox
displays 1, th = 2 this =3 this is a trial =14.
This is, as far as I know, what I suggested a solution for. If you do
not get it to work, tell which event you're using and which property
you
are measuring - i e - paste your code with event handler.
As you suggest, Txtbox = Len(Field) works fine but does not count as you
type.
I did NOT suggest that. Again - I did NOT suggest that. Please reread
my
suggestion. It is very short, but also quite specific with regards to
- which property of the text control to measure (.Text)
- which event to use for this on the same control (on change)
My suggestion is, I think, close to being a standard/basic approach to
something like this.
This is true if you put the equation in on change, key down, key up
etc? Perhaps it is because of the reserved word "Count" Once you have
finished typing and move the focus, the text box then returns the total
number of charaters used. I will try again without using the txtbox name
count.
I think I was clear that you musts check the .Text property of the
control. This property give the current content of the text control,
and
is the only property of text controls that will contain what is typed
into a control when testing it in the on change event. The .Value
property, which is the default property of the control, meaning you
don't need to specify it, is what it seems you are using - only
contains
what is saved into the control (i e, before starting to type, or after
leaving the control - but not contents while typing)
As I said, my only interest is in how you solve this one. I have a use for
this as well.
I think I did.
Thank you and best wishes
Create a new form. In design view drop two text controls;
txtMsg - the control in which we type
txtCount - the control which is to receive the count
in the on change event of the txtMsg control enter
me!txtCount = 160 - len(me!txtMsg.Text)