Memo Field limiter

  • Thread starter Glenn Koster via AccessMonster.com
  • Start date
G

Glenn Koster via AccessMonster.com

Has anyone been able to put a limit on the number of characters than can be
entered into a memo field from a form ? There are no limiters on the memo
properties or the table, when the text exceeds the size of a report page, the
report becomes endless. There must be some way to do this, any ideas ?
Thanks )
 
R

Rick Brandt

Glenn said:
Has anyone been able to put a limit on the number of characters than
can be entered into a memo field from a form ? There are no limiters
on the memo properties or the table, when the text exceeds the size
of a report page, the report becomes endless. There must be some way
to do this, any ideas ? Thanks )

What do you mean "...the report becomes endless"? It should exactly as long
as the data in RecordSource dictates.

There are methods involving counting keystrokes and/or characters which can
be a bit balky or you can simply use the AfterUpdate event to trim the field
to a set number of characters and inform your users where that cut-off is.
 
G

Glenn Koster via AccessMonster.com

What I mean by endless is that when the the amount of text in one memo field
does not fit on one page, access just keeps making more and more pages, you
can't get to the last page because it never stops.

Any chance you could give me an example of a trim statement that would
accomplish this ?

Many thanks
 
R

Rick Brandt

Glenn said:
What I mean by endless is that when the the amount of text in one
memo field does not fit on one page, access just keeps making more
and more pages, you can't get to the last page because it never stops.

Any chance you could give me an example of a trim statement that would
accomplish this ?

Many thanks

Then you have something else going on. I have had memo fields that held many
thousands of characters and have never seen that cause a report to run on
forever. I HAVE seen one case where the specific combination of the banded
section sizes on a report would cause endless page run-on. I can't remember the
specifics, but if I do I'll post back.

If you wanted to limit the length to 500 characters you would use the following
in the AfterUpdate event of the TextBox.

Me.TextBoxName = Left(Me.TextBoxName, 500)
 
G

Glenn Koster via AccessMonster.com

I had never seen this happen before either, it took me a while to figure out
why this was happening. The only thing that solved the endless report was to
shorten the amount of text in the memo field so it would fit on one page.

I tried Me.WR3 = Left(Me.WR3, 10) in the AfterUpdate but it didn't limit the
amount of text. I tried it in a textbox also same result.
 
R

Rick Brandt

Glenn said:
I had never seen this happen before either, it took me a while to
figure out why this was happening. The only thing that solved the
endless report was to shorten the amount of text in the memo field so
it would fit on one page.

I tried Me.WR3 = Left(Me.WR3, 10) in the AfterUpdate but it didn't
limit the amount of text. I tried it in a textbox also same result.

How exactly did you enter it? Actually now that I think about it, you really
only need to limit the text in the report rather than what is actually entered
so you could just use the left() expression in the ControlSource of the TextBox
where the memo field is displayed.

But...if you haven't yet, try building the report over from scratch. Or try
changing slightly the height of various sections and I'll bet that you see the
problem go away.
 

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