+ Reply to Thread
Results 1 to 4 of 4

Populate one combo box from results of another combo box

  1. #1
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Populate one combo box from results of another combo box

    Can't seem to figure out what's going on here. I have the first combo box which I can select the day and the second combo box will display the month.

    Everything works fine until I select a day in which there is only one month and then I get the following error.

    Error 381 (Could not set the List property Invalid property array index)

    Is this also the best way to populate the second combo box off of the results from the first?

    I ran a breakpoint and cbomonth shows null.

    Please Login or Register  to view this content.
    Last edited by jeffreybrown; 09-07-2010 at 04:52 PM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Populate one combo box from results of another combo box

    The List property expects an array, and one cell value is not an array. Check the source range count: if it's 1, then use additem (clear the list first); otherwise use List.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Populate one combo box from results of another combo box

    Thanks romperstomper,

    I went with...

    Please Login or Register  to view this content.
    Thanks for the steer in the right direction.

    Jeff

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Populate one combo box from results of another combo box

    No worries. Please don't forget to mark the thread 'Solved'.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1