Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2016
    Provided Answers: 1

    Unanswered: Update multiple combo boxes with 1 button


    My query results are presented in a form. I have a combo box that say's "yes" or "no". Based upon the previous screen's filter the query presents a different data set. I want to build up button that updates all the combo boxes to eithe ryes or no based upon the button you select.

    The problem is that the query results may have 50 data records but the code I wrote only updates the first record. ANY HELP?

    Private Sub Command162_Click()
    Me.cbo_issued.Value = "Yes"

    End Sub

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    So for each combobox, not jyst cbo_issued set to the required value.
    The is a way to programtically go through each control in the controls colle tion, identify its type and take appropriate action
    Alternatively you could set the tag property for each desired control and take appropriate action

    Listing each combo list box is ,ore laborious, any changes to the design require the new control to be added to the list to be changed

    Developing, testing and using the code based on control type takes longer but may be more future proof, however it does infer you cannot have a combo that isnt updated in background

    Setting the tag property requires more development, more savvy but us more flexible. If in doubt stick with listing each combo to changed
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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