• Memo Fields (2000)

    Author
    Topic
    #366243

    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!

    Viewing 1 reply thread
    Author
    Replies
    • #567361

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

    • #567474

      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.

      • #567475

        … 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.

    Viewing 1 reply thread
    Reply To: Memo Fields (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: