How to return multiple strings from a user defined function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cornedbeef007-groups@yahoo.com.au

    #1

    How to return multiple strings from a user defined function

    I have built a database for dog pedigrees.
    I want to be able to display the siblings for a dog on it's pedigree. I
    am able to find the names in my database, and at present return them
    from a UDF concatenated into one long string.
    Problem is a large litter can exceed 255 characters of a string.
    I thing a better solution is to assign the dogs names to an array of
    strings and return that from the UDF as type variant.
    My problem now is, how do I take the data from the array, and place
    them on a report. Currently I use a bound textbox and its data source
    is the UDF.
    What type of control can display an array of strings returned as type
    variant?

    Thanks.

  • Larry Linson

    #2
    Re: How to return multiple strings from a user defined function

    String Variables can be longer than 255 characters.

    It is Text Fields that have a maximum of 255; but, if you want to store
    these values, just use a Memo Field instead. You can type a max of 65,536
    characters in a Memo field, but storing data via program, you can store even
    more.

    So, perhaps you don't have the problem you anticipated.

    Larry Linson
    Microsoft Access MVP


    <cornedbeef00 7-groups@yahoo.co m.au> wrote in message
    news:1147065054 .206065.31580@e 56g2000cwe.goog legroups.com...[color=blue]
    >I have built a database for dog pedigrees.
    > I want to be able to display the siblings for a dog on it's pedigree. I
    > am able to find the names in my database, and at present return them
    > from a UDF concatenated into one long string.
    > Problem is a large litter can exceed 255 characters of a string.
    > I thing a better solution is to assign the dogs names to an array of
    > strings and return that from the UDF as type variant.
    > My problem now is, how do I take the data from the array, and place
    > them on a report. Currently I use a bound textbox and its data source
    > is the UDF.
    > What type of control can display an array of strings returned as type
    > variant?
    >
    > Thanks.
    >[/color]


    Comment

    Working...