locked
Pass Checkboxlist values to Access db RRS feed

  • Question

  • User1772043685 posted

    Hello All,

    Been a long time since I have ventured into this forum. Cool Wow how the look had changed.

    Need some help.  I understand my request is not the best practice, but it will be good enough for the application at hand.

    How do I get values of selected items of a checkboxlist to pass to one column of an Accsss db?

    Using accessdata source and working in VB. 

    Thanks,

    TRU

    Saturday, May 14, 2011 11:15 PM

Answers

  • User3866881 posted

    Hi:)

    Suppose you have a CheckBoxList, try this:

    foreach(ListItem item in CheckBoxList.Items)

    {

             if(item.Selected)

              {

                 //Here your SQL inserting, deleting or updating....

              }

    }

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 16, 2011 11:19 PM

All replies

  • User1867929564 posted

    I think checkboxlist  work same as dropdownlist.
    Populate checkbox list with value and Text.
    Insert checkboxlist's value in msaccess.
    Datatype according to the values of checkboxlist. 

    Monday, May 16, 2011 7:18 AM
  • User3866881 posted

    Hi:)

    Suppose you have a CheckBoxList, try this:

    foreach(ListItem item in CheckBoxList.Items)

    {

             if(item.Selected)

              {

                 //Here your SQL inserting, deleting or updating....

              }

    }

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 16, 2011 11:19 PM