ms-access: clear text in all controls with one click
i have some comboboxes and some textboxes on a form
i would like to clear all of them with开发者_如何学JAVA one line of code. is that possible?
something like all_controls.text=""
Not with one line of code. You will have to walk through all of the controls with a loop.
Dim ctl As Control
For Each ctl In Me.Controls
If (ctl.ControlType = acTextBox) Then
ctl.Value = Null
End If
Next ctl
http://www.tek-tips.com/faqs.cfm?fid=5010
精彩评论