Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Posts
    2

    Unanswered: Access 97 List Box Value List Max Length

    I am failing to assign a value list to a list box in Access 97 in a reasonable fashion when the length of the string exceeds 2000 bytes. In fact, the only way I seem to be able to do so, is by breaking up the string into array elements less than 255 bytes each and setting the rowsource property by concatenating the array elements. This seems pretty bogus. Any suggestions?

  2. #2
    Join Date
    Aug 2002
    Location
    Québec, Canada
    Posts
    109
    ListBox and TextBox are limited in Access to 2048. If your text if so long, that is probably because you use a memo field. Linking a TextBox to a memo field will increase the number of bytes he can contains

    JeffB

  3. #3
    Join Date
    Oct 2002
    Posts
    2
    Thanks very much for answering my question so quickly!

    For cases in which this string length limit is unacceptable, here's a cool technique:

    (a) Dynamically create a queryDef
    (b) Assign an appropriate ODBC connection string
    (c) Set the list box row source property to this query

    Result is enabling large result sets to nicely fill the list control. Actually, another member of our group had written a short routine to do this and I simply made use of it .

  4. #4
    Join Date
    Aug 2002
    Location
    Québec, Canada
    Posts
    109
    On second thought, you can use the RichText box control (ActiveX control), it uses more ressources, but can contains as many text you want, and might be simple to use.

    JefB

Posting Permissions

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