Access basic 97
Access basic 97
(OP)
I have a form with several text boxes on it. Is there any way to clear all of the text boxes at once without individually setting their .text = ""?
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS Contact USThanks. We have received your request and will respond promptly. Come Join Us!Are you a
Computer / IT professional? Join Tek-Tips Forums!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines |
|
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
Register now while it's still free!
Already a member? Close this window and log in.
RE: Access basic 97
Sub ClearForm()
Dim frm As Form, ctl As Control
' Set the current form as the target
Set frm = Screen.ActiveForm
' Enumerate Controls collection of each form.
For Each ctl In frm.Controls
' Print name of each control.
If ctl.ControlType = acTextBox Then
ctl = ""
End If
Next ctl
End Sub