473,804 Members | 4,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5944
Hi DBQueen,

Try:

Private Sub ThisMemo_Before Update(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********@hotm ail.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
10479
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 field, and it works. But, it seems wrong since I had to create a huge text box to accommodate memo fields with a lot of text. Thanks for any help, ShyGuy
1
2602
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 general group note on a form, click a button, and have that note stored in the memo field for each person's appointment record. I created a form with an unbound field called GroupNote. I then run an update query that updates the note field for all...
4
5406
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 memo field When CAN GROW is set to NO everything works just fine. When CAN GROW is set to YES - watch out.... One record causes BIG
16
4887
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 is a VBA function which demonstrates the problem. Thanks -Mark
4
7246
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 within this field. My idea was to have the memo field locked on the form to stop edits. Place a command button by the memo field which opens an unbound form with a single text box. The user enters their update into the unbound form and upon closing...
1
2340
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 250 character field length. So, I am looking for a way to write a query or script that will pick up the first 250 characters of the memo field and insert them into the first field of my query, the second 250 characters into the second field of...
9
5742
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 field is printed within the detailed area. The problem is, the apllication is not setup properly, thus the users are entering data within the memo field as: location1 1/1/2005 1/1/2006
2
1691
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 problem lies with my getting the output of the crosstab into one field in the label template. Basically, my crosstab of cloth sizes and quantities, which could be in
4
1745
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 copied the memo field from the form to the report. I verified that the font and font size (MS Sans serif 8) were the same. However, the text shows differently. On the printed version, more text shows on the line than in the form. Suggestions?
0
9589
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10593
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10329
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7626
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3830
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.