Use a FOR loop based on your form's controlcount property, reference each control inside the loop using the Controls collection of your form, check the controls to see if their baseclass = "textbox" and if so look to see if they are visible and count accordingly.
>hi all,
>
>i need help to count how many textbox.visible .t. at my form as anumber
>m.count1=3 or 2 or ...
>
>thisform.text4.visible =Thisform.text4.value>0
>thisform.text5.visible=Thisform.text5.value>0
>thisform.text6.visible=Thisform.text6.value>0
>thisform.text7.visible=Thisform.text7.value>0
>thisform.text8.visible=Thisform.text8.value>0
>thisform.text9.visible=Thisform.text9.value>0
>
>thanks