How to use Controls collection in Access 2003 and VBA

后端 未结 4 484
遥遥无期
遥遥无期 2020-12-18 15:59

I\'m having a heck of the time trying to figure this one out.

I want to pass a Controls collection to a function but I get a type mismatch. Here\'s the function decl

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-18 16:05

    I'm taking a different path now. In my tab control, I only have subforms. So I'm taking a play from OOP and made a function for each subform called EnableForm. The subform can now handle whatever it needs to do on itself. In the form that contains the tab control, I just iterate over the pages of the tab control, see if the page contains a subform and then call the EnableForm function.

    It's dirty as all heck but it works and I will document it in the code. Something this thing lacked (and most of the other access DBs here) from the get go.

提交回复
热议问题