locked
How to set defaults, and interogate a Multiselect Combo Box with Checkboxes RRS feed

  • Question

  • How do I set defaults, and interogate a Multiselect Combo Box with Checkboxes?

    Does anyone know of any good examples with multiselect combo checkboxes that are used to store multiple values for a field. And, then to interogate the checkbox to find what selections have been made, and finaly how to set the values in the checkbox field?

    Thank you 

    Nate


    Nath

    Saturday, March 4, 2017 7:38 PM

Answers

  • Hi Nate,

    I was trying to find where I might have posted sample code but was having a hard time locating them.

    To use a SELECT query to see what were selected, you could use something like this:

    SELECT MVFieldName.Value FROM TableName WHERE ID=100

    The above will show you all the selected values for the MVF in the table for the record with an ID value of 100.

    Hope it helps...


    • Proposed as answer by Chenchen Li Monday, March 20, 2017 10:12 AM
    • Marked as answer by NaPazz Monday, March 20, 2017 10:51 PM
    Saturday, March 4, 2017 9:33 PM

All replies

  • Hi Nate,

    It seems you can only set one value as a Default Value in a MVF at the table level. To interrogate the field, you can use a SELECT query using the VALUE field of the MVF. To set the values, you can use a Recordset object to add each value or use an APPEND query to do the same.

    Hope it helps...

    Saturday, March 4, 2017 7:54 PM
  • Hi. 

    Thanks for the advice.

    I don't suppose I could trouble you for an example? Or do you know where I could find one please?

    Thanks.

    Nate


    Nath

    Saturday, March 4, 2017 9:28 PM
  • Hi Nate,

    I was trying to find where I might have posted sample code but was having a hard time locating them.

    To use a SELECT query to see what were selected, you could use something like this:

    SELECT MVFieldName.Value FROM TableName WHERE ID=100

    The above will show you all the selected values for the MVF in the table for the record with an ID value of 100.

    Hope it helps...


    • Proposed as answer by Chenchen Li Monday, March 20, 2017 10:12 AM
    • Marked as answer by NaPazz Monday, March 20, 2017 10:51 PM
    Saturday, March 4, 2017 9:33 PM