Jasper,
The form has a Controls collection which you can poll for controls of type textbox. The property of each control is called
ControlType and the constant for checking is acTextBox. Sample code follows: (untested)
For Each ctl In me.Controls
If ctl.ControlType = acTextBox Then
ctl.Enabled = True
End If
Next
And I believe in VB is also a Controls collection rather than a TextBox one. HTH
>Dear All,
>
>In Access 2002, I have a form with 9 textbox on it.
>Let say I want to enable or disable all of them in Runtime.
>In VFP, we can use the setall function.
>In VB, we can loop the textbox collection.
>Can I do the similar coding in Access 2002?
>Rather then I need to write 9 lines of code like this:
>me.textbox1.enabled=true
>me.textbox2.enabled=true
>............me.textbox9.enabled=true
>
>Thanks.
>-Jasper