How to cycle through Textbox Controls Access VBA -
i wanted code cycle thru names of text box controls on form visible = true. know code constructed incorrectly, need ask if can point me in right direction.
public sub txtboxnamevisible(byref pfrm form) dim ctl control dim txtbx textbox each txtbx in pfrm.controls.visible = true msgbox txtbx.name next txtbx end sub
pfrm.controls.visible not compile because controls collection. visible supported property members of collection, not supported on collection itself.
loop through pfrm.controls, check whether each of them visible text box, , msgbox names of ...
dim ctl control each ctl in pfrm.controls if ctl.controltype = actextbox , ctl.visible = true msgbox ctl.name end if next ctl
Comments
Post a Comment