By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,390 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Limiting Memo Field Size

P: n/a
How can I limit the size of a Memo field? I don't want the user to be able
to enter more than 500 characters.

Thanks!

Andi
Jul 25 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi DBQueen,

Try:

Private Sub ThisMemo_BeforeUpdate(Cancel As Integer)
If (Len(ThisMemo) 500) Then
MsgBox "Memo is too long. Reduce to 500 characters"
Cancel = True
End If
End Sub
HBInc.
DBQueen wrote:
How can I limit the size of a Memo field? I don't want the user to be able
to enter more than 500 characters.

Thanks!

Andi
Jul 25 '06 #2

P: n/a

DBQueen wrote:
How can I limit the size of a Memo field? I don't want the user to be able
to enter more than 500 characters.

Thanks!

Andi
It's a bit more complicated than using BeforeUpdate... fortunately,
Allen Browne sorted it out for everyone... (thanks Allen!... I would
have been forever working on that!)

http://www.allenbrowne.com/ser-34.html

Jul 25 '06 #3

P: n/a
Hi,

The complication is only when you want to stop input after the 500th
character.
In that case you're right.
In the case you want to limit the amount of text in a Memo field to
500, there is this less formal approach with ThisMemo_Before_update, in
which the user of the Memo field can reduce his remark to 500
characters or less.

HBInc.

pi********@hotmail.com wrote:
DBQueen wrote:
How can I limit the size of a Memo field? I don't want the user to be able
to enter more than 500 characters.

Thanks!

Andi

It's a bit more complicated than using BeforeUpdate... fortunately,
Allen Browne sorted it out for everyone... (thanks Allen!... I would
have been forever working on that!)

http://www.allenbrowne.com/ser-34.html
Jul 26 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.