R
ryguy7272
I have been using the code below in an Excel UserForm for a while without any
problems.
Private Sub Command337_Click()
Dim C As MSForms.Control
For Each C In Me.Controls
If TypeOf C Is MSForms.TextBox Then
C.Text = ""
End If
Next C
End Sub
I copied/pasted it into an Access Form so I could clear the values of all
Controls, but I get a message that says Compile Error: User-defined type not
defined. Are the Controls in Access different from the controls in Excel? I
read several posts on this DG; still not able to clear all the Controls in my
Access Form.
I have several textboxes and several ComboBoxes. How can I clear all values
in all Controls in my Access Form? Set to Null?
Thanks,
Ryan---
problems.
Private Sub Command337_Click()
Dim C As MSForms.Control
For Each C In Me.Controls
If TypeOf C Is MSForms.TextBox Then
C.Text = ""
End If
Next C
End Sub
I copied/pasted it into an Access Form so I could clear the values of all
Controls, but I get a message that says Compile Error: User-defined type not
defined. Are the Controls in Access different from the controls in Excel? I
read several posts on this DG; still not able to clear all the Controls in my
Access Form.
I have several textboxes and several ComboBoxes. How can I clear all values
in all Controls in my Access Form? Set to Null?
Thanks,
Ryan---