02-11-16, 17:07 #1Registered User
Provided Answers: 1
- Join Date
- Jan 2016
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"
02-11-16, 18:50 #2Jaded Developer
Provided Answers: 59
- Join Date
- Nov 2004
- out on a limb
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 changedI'd rather be riding on the Tiger 800 or the Norton