Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Manchester, Gtr Manchester, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Memo Fields (2000)

    Does anyone know of a way to restrict the number of characters entered into a memo field via a bound textbox on a form?
    I have seen a example but when I try to modify the code the whole of Access locks up and crashes!

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, UK, Berkshire, England
    Posts
    243
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Memo Fields (2000)

    Could you post the code, might be able to spot the problem

  3. #3
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Memo Fields (2000)

    One way is to Set the Validation Rule for the Memo Box Properties in the table where the data is being entered as follows:
    Len([NameOfMemoField])<=N

    For example, your table has a Field Name of MEMOFIELD with a Data Type of Memo that you want to limit to 100 characters or less.

    In the validation rule for the memo field, insert the following:
    Len([MEMOFIELD])<=N

    Also add some text to the Validation Text on the properties as well.

    If someone inputs more then 100 characters they will receive the message you input in the validation text.

    Hope this helps.
    Regards,

    Gary
    (It's been a while!)

  4. #4
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Memo Fields (2000)

    ... Sorry, a quick correction to the lower Len statement

    One way is to Set the Validation Rule for the Memo Box Properties in the table where the data is being entered as follows:
    Len([NameOfMemoField])<=N

    For example, your table has a Field Name of MEMOFIELD with a Data Type of Memo that you want to limit to 100 characters or less.

    In the validation rule for the memo field, insert the following:
    Len([MEMOFIELD])<=100

    Also add some text to the Validation Text on the properties as well.

    If someone inputs more then 100 characters they will receive the message you input in the validation text.

    Hope this helps.
    Regards,

    Gary
    (It's been a while!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •