473,787 Members | 2,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Limit Characters allowed in a Memo Field

2 New Member
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("Specifica tion")<1000

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

PLEASE HELP ME!!

Thanks, TechyGal
Aug 30 '07 #1
5 7036
missinglinq
3,532 Recognized Expert Specialist
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
MGrowneyARSI
90 New Member
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 Recognized Expert Specialist
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
MGrowneyARSI
90 New Member
Sure thing will do next time
Aug 30 '07 #5
FishVal
2,653 Recognized Expert Specialist
Hi, TechyGal

Len("Specificat ion") 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
16699
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 then does save the entire comment to the table. However, when I use a query which includes this field to send to a report, the field is truncated at the old text field limit of 255 characters. I have ascertained that it is happening in the query,...
1
2601
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...
5
2659
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 not store the excess characters beyond 2000, giving the user the false sense of security that what they are typing beyond 2000 characters is being saved, which is not the case. I want to prevent the user from typing more than 2000. How do i do...
3
2897
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 just 1 char? also integers they are probably not included either? I just need to make sure none of my tables exceeds the limit. Thanks
3
10166
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 the data at some length limit, however if I import the same data into an Excell spreadsheet, nothing gets cut off. Any ideas how to get all the data into Access without going through some intermediate step with Excell?
1
2338
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...
4
4627
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
14425
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 be greater than 255 characters. 2. I have an access database. I link (not import) to the contents of the excel spreadsheet. In the design view in access, Column A has the data type "memo".
7
1841
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 field the data populates just fine. We also have the exact same T42 IBM thinkpad and the verision of access is the same on both workstations. Any ideas as to what's causing this?
0
9655
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10169
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
10110
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
9964
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...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
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
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.