Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting properties value to multiple control in the form
Message
From
23/12/2002 10:37:47
 
 
To
20/12/2002 01:38:36
General information
Forum:
Microsoft Office
Category:
Access
Miscellaneous
Thread ID:
00734791
Message ID:
00735380
Views:
26
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
Previous
Reply
Map
View

Click here to load this message in the networking platform