In a form, create a list box or combo box that gets its rows from a function

You may want to use this procedure when the values in a list are constantly changing, or if the values aren't stored in a database. For example, you could write a function that fills a list box with a list of dates, each one a specific number of days after the current date.

  1. Create the function. For information on creating the function, click .

  2. Create the list box or combo box and open its property sheet.

  3. In the RowSourceType property box, enter the name of the function. Don't put an equal sign before the function name.

  4. Leave the RowSource property box blank.