How do I find the maximum number of characters that will fit in a.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have memo box that I want to only allow the number of characters that will
fit in the box and no more. How do I find the maximum number of characters
allowed and then restrict it to that amount?
 
It depends on the size of the box, the font, etc. If you are using a font
like Times New Roman, where character width varies, then there is no way to
do this. you could fit fifty i's in a box that might only hold 20 M's.

The individual's monitor resolution might even make a difference.

If you use courier (kinda ugly in my opinion) then the box would indeed have
a hard limit, but again, you would need to try different monitor resolutions
to see if it changes things.



Rick B


"access text box does not auto scroll"
 
I see. Well, do you know of any way to keep someone from typing outside of a
memo box?
Thanks,
Andy
 
If you turn on scroll bars, then there is no such thing as "outside of memo
box".

Rick B





"access text box does not auto scroll"
 
"access text box does not auto scroll"
I have memo box that I want to only allow the number of characters
that will fit in the box and no more. How do I find the maximum
number of characters allowed and then restrict it to that amount?

Have a look at what Stephen Lebans has here:

http://www.lebans.com/limittextinput.htm

<quote>
New Version 2.0 LimitTextInput.zip is a database containing a function
to limit the input into a TextBox control. Will allow data input that
will fit within the current displayable area of the control only.
Handles both Keyboard and Mouse events. Includes a self contained
function to mimic the Report objects TextHeight method
</quote>

Or maybe you would be able to use the function posted here:

http://www.lebans.com/textwidth-height.htm

if it's not the same.
 
Yes, I turned on the scroll bar, but there is no way to tell where to stop
and I do not want the data to flow to the next page.


Lebans files do not work. something about being read only when tries to
open in Access.

Any other suggestions?
Thanks for your help,
Andy
 
I really do not appreciate your statement "Lebans files do not work."
There code works as advertised. Your problem lies somewhere between your
keyboard and your brain. Good luck figuring it out.

--
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"access text box does not auto scroll"
 
Wow, aren't we touchy. No reason to get upset and start insulting people. I
do not believe that is what the discussion groups are for.
 
access text box does not auto scroll said:
Wow, aren't we touchy. No reason to get upset and start insulting people. I
do not believe that is what the discussion groups are for.

Andy,

OK, let’s discuss what you've said.

I don't think Stephen Lebans is being "touchy" or "insulting"; after all,
YOU posted an unqualified statement that "... code doesn't work". Just
because you didn't understand how to implement the code or used the wrong
code for what you were trying to do, doesn't mean the code doesn't "work".

I have used Stephen Lebans code; not always successfully. But that was *MY*
fault because I didn't understand how to use the code, NOT the code itself!
It was PBKAC syndrome. <g> Should I insult the maker of a screwdriver because
I can't make it remove a nut from a bolt?

Stephen Lebans takes (justifiable) pride in his work (as you or I do/would).
He has spent uncounted hours learning about Access, providing code (for you
to use) and answering questions on the newsgroup. Where is your web site with
the code you have written??

You have PBKAC syndrome; we all have at one time or another. But when you
need help, want help and ask for help, you should be polite.

I apologize to you in advance if you think I am attacking you - that is not
my intention. But you were wrong, then rude and you need to know it...

---
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)


(PBKAC: "Problem between keyboard and chair")
 
Back
Top