473,432 Members | 1,752 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,432 software developers and data experts.

Limit Characters allowed in a Memo Field

Hi there,

I really hope someone can help as I have been trying for two days now and to no avail.

I am trying to add a validation rule to a memo type field in MS Access 2007. I need to limit the amount of text that can be entered into this field to about 1000 characters. I have tried using the following validation command but it is not working! Any ideas would be very greatfully recieved! :)

Validation Rule =Len("Specification")<1000

where "Specification" is the name of the memo field I need to limit.

PLEASE HELP ME!!

Thanks, TechyGal
Aug 30 '07 #1
5 7019
missinglinq
3,532 Expert 2GB
And what do you want to do when the limit is reached? Simply use the first 1000 characters, throw up a message telling the user the data is being truncated to 1000 characters, something else?

This will do both:
Expand|Select|Wrap|Line Numbers
  1. Private Sub MyMemoField_Change()
  2. Dim CharCount As Integer
  3.  
  4. If Not IsNull(Len(MyMemoField)) Then
  5.  CharCount = Len(MyMemoField.Text)
  6.   If CharCount > 1000 Then
  7.    MsgBox "You've reached the limit"
  8.    Me.MyMemoField = Left(Me.MyMemoField.Text, 1000)
  9.   End If
  10. End If
  11. End Sub
  12.  
Welcome to TheScripts!

Linq ;0)>
Aug 30 '07 #2
Take a look at this site some in the past was trying to do the same thing and said this put him in the right direction looks a bit more complex then you wouild think http://www.allenbrowne.com/ser-34.html hope that helps
Aug 30 '07 #3
missinglinq
3,532 Expert 2GB
MGrowneyARSI, just FYI, when posting links you need to use the URL tags, such as here:

[ URL ]http://www.allenbrowne.com/ser-34.html[ /URL ]

but eliminating the spaces inside of the square brackets.

Linq ;0)>
Aug 30 '07 #4
Sure thing will do next time
Aug 30 '07 #5
FishVal
2,653 Expert 2GB
Hi, TechyGal

Len("Specification") always returns 13, the length of word "Specification". ;)
Use square brackets to enclose field name. Len([Specification])<1000

Good luck.
Aug 30 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: dixie | last post by:
I have just run into a problem where I have a text box control on a form that is linked to a memo field in a table. When I type a really long comment into the field, it allows me to type it and...
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...
5
by: Mitchell Thomas | last post by:
I am using Oracle as a backend and have a field set as Varchar2(2000). The problem i have is access interprets this as a memo field and allows the user to type more than 2000 characters but does...
3
by: ken | last post by:
Hi, I was wondering how the 4k table record limit is counted. I have access 2k. I text fields are 256 chars. Memo fields are not included in the calculation. What about yes/no fields would that be...
3
by: JOSHUA JACKS | last post by:
I receive data from a web form in csv (comma and quote) form which I import into Access. The data include some long narratives (three fields of two to three paragraphs). Access seems to cut off...
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...
4
by: jason.teen | last post by:
Hi, when i am joining on a Column of Text Type with one of Memo type the resulting entry has funny chinese characters! Has anyone else encountered this before? Is there a cure?? Cheers.
0
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
7
by: egateway | last post by:
When a user attempts to past around 30,000 characters of text into a memo field the user gets a size limit error of some kind; however when I past the same data from my workstation into the memo...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
1
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
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...

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.