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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -