473,396 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Limiting Memo Field Size

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
3 5924
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

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Shyguy | last post by:
I want to create two buttons on a form. One would allow the user to Copy the contents of the current records memo field, the other would allow them to print. I set up a report based on the memo...
1
by: j.mandala | last post by:
I have a memo field in an appointment application that stores session notes for group psychotherapy sessions. Each attendee of the group has an appointment record. I want to be able to write a...
4
by: Mal | last post by:
I have an ACC 2000 database that has a strange behaviour I have a small table, with just a few fields... My report has very simple grouping and sorting, no code bar a NODATA event. I have a...
16
by: Mark | last post by:
Hello. I am attempting to use AppendChunk() to write binary data to a memo field in Access 2000. My initial call to AppendChunk() results in a data type conversion error. Any suggestions? Here...
4
by: Mark Reed | last post by:
Hi All, here is what I am trying to achieve. I have a memo field on a form which users will need to add to as and when. I do not want them to be able to edit information which already exists...
1
by: Montana_Trader | last post by:
I have a product database that includes a memo field for product descriptions. That database must be imported into a legacy system that has four text fields for product descriptions, each with a...
9
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
2
by: Phil Latio | last post by:
My quandary is this..... I have a label application (Bartender) that I have hooked up to Access, to use the output of a cross tab. I've succeeded in getting the data within Access, but my...
4
by: Bob Alston | last post by:
My client insists that the printed copy of text entered into a memo field have EXACTLY the same layout as it appears on the screen. I found I had to eliminate the vertical scroll bar. Then I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.