none
Select combobox value bound to multivalue record

    Question

  • I am using VBA for Access 2007.

     

    I have a form for adding new records to a table.  It uses a combobox bound to a multivalue field in the table.  I would like to programmaticly select multiple values in the combobox.

     

    I have tried .selected(i) = true but it is read only.  I have a feeling .value(i) might be what i need to use but it is an empty variable array onload.

     

    I read somewhere that recordsets might be the way to go but I'm not sure how to implement it.

    Sunday, November 20, 2011 1:54 AM

Answers

  • Waroo,
     
        My sample db named Form_A2K10_MultiValueFields might be of interest to you. It is in accdb file format (developed on Access 2010) and is available at Rogers Access Library. Link:

        This sample db demonstrates handling of multi-value fields (MVF) on access forms. Three aspects are covered as follows:

        1 - Adding / Replacement of MVF value elements in target subform as per source subform.
        2 - Applying Form Filter on multi-value field as per reference multi-value field.
        3 - Sorting by multi-value field (bound column or displayed column as desired)

    Best wishes,
    A.D. Tejpal
    ------------
     
    ----- Original Message -----
    From: waroo
    Newsgroups: Msdn.en-US.accessdev
    Sent: Sunday, November 20, 2011 07:24
    Subject: Select combobox value bound to multivalue record

    I am using VBA for Access 2007.

    I have a form for adding new records to a table.  It uses a combobox bound to a multivalue field in the table.  I would like to programmaticly select multiple values in the combobox.

    I have tried .selected(i) = true but it is read only.  I have a feeling .value(i) might be what i need to use but it is an empty variable array onload.

    I read somewhere that recordsets might be the way to go but I'm not sure how to implement it.


    A.D. Tejpal
    • Marked as answer by Bruce Song Monday, December 05, 2011 10:10 AM
    Sunday, November 20, 2011 3:47 AM