Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Mar 2003
    Location
    Elkins Park, Pennsylvania, USA
    Posts
    325
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Text Box Limit (Access 2002)

    Hi. I have a quick question: I have a form that pops up automatically when a certain database is opened, and there is a text box (with vertical scroll bars) on it that displays a list of all files in a certain subdirectory that are more than 48 hours old. Today, I noticed that 1) a check of the directory itself showed that there were 92 files that met that criteria, and 2) the text box was empty. This box has always worked before, although there have never been more than a dozen or so "old" files that needed to be listed.

    What is the limit of the length of a string that I can put in a text box? (The list in question would have been over 5,000 characters.) I was able to trap the error (error 2176), but I can't find any mention in the help file of just what the limit is. Knowing it would be nice so that I can provide a more elegant error-handler (e.g. If len(oFiles) > too_many Then...)

    Thanks in advance for your help!
    <font face="Comic Sans MS">That's what you do in a herd; you look out for each other!</font face=comic> - Mike

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Text Box Limit (Access 2002)

    A text box can display up to 65535 (= 2^16 - 1) characters. It can be found by looking for Specifications > Form and Report in the online help.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Text Box Limit (Access 2002)

    As Hans pointed out, a checkbox can hold enough data to handle what you have; and even if you exceeded this limit, I'd think Access would just chop the results. I'd guess you have a problem in the function that fills the textbox.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text Box Limit (Access 2002)

    Just to make sure, are you really dealing with a textbox, or is this a listbox? Listboxes and comboboxes, when you set a string to their ValueList, are limited to 2048 characters. You can program around this by using a callback function, instead of a value list.

Posting Permissions

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