why won't this work:

VB Code:
  1. dim coll as collection
  2. dim og as OptionButton
  3. dim cb as ComboBox
  4. dim TB as TextBox
  5.  
  6. for each og in me.controls
  7. coll.add og
  8. next
  9.  
  10. for each.... ' same with textboxes and comboboxes
  11.  
  12. but it gives me an error.
  13.  
  14. even this won't work:
  15.  
  16. for each cb in me.controls
  17. ....
  18. ctr.enabled=false
  19. next cb