Populate listbox rowsource from function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chaihana Joe

    Populate listbox rowsource from function

    Hi

    I'm trying to populate a listbox as a value list in code (access
    2003).

    Unfortunately I'm getting 'runtime error 2176 - the setting for this
    property is too long' somewhere around the 2000 character mark.

    Searching on the web I've seen mention that there is a limit of 2048
    characters for a value list and that a workaround is to use a function
    to populate the list. But I can't see anywhere how to actually do
    this.

    Does anyone have a reference or an example of how it works?

    (I can populate the list fine using a query, but would prefer not to
    have the control bound to the data.)

    TIA

  • Bruce

    #2
    Re: Populate listbox rowsource from function

    On Apr 16, 8:04 am, Chaihana Joe <i...@chezburns .comwrote:
    Hi
    >
    I'm trying to populate a listbox as a value list in code (access
    2003).
    >
    Unfortunately I'm getting 'runtime error 2176 - the setting for this
    property is too long' somewhere around the 2000 character mark.
    >
    Searching on the web I've seen mention that there is a limit of 2048
    characters for a value list and that a workaround is to use a function
    to populate the list. But I can't see anywhere how to actually do
    this.
    >
    Does anyone have a reference or an example of how it works?
    >
    (I can populate the list fine using a query, but would prefer not to
    have the control bound to the data.)
    >
    TIA
    There is a good example of this (using a callback function to fill a
    listbox) by Dev Ashish at the Access web:



    HTH,
    Bruce

    Comment

    Working...