All,
I'm trying to move this code (which I bastardized, thanks!) from the
form where I have successfully implemented it to a Module, so I can
implement it for all of the appropriate forms in my app.
Of course, I'm getting an error because I can't use Me. in a Module.
I read the many posts explaining why I can't, but did not find an
answer as to how to resolve this.
Any suggestions?
Thanks,
Patrick
************************************************** ************************************************** **********
Public Sub Clear_All()
On Error GoTo Err_BTN_Clear_All_Click
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Tag <"NoDel" And TypeOf ctl Is TextBox Or TypeOf ctl Is
ComboBox Or _
TypeOf ctl Is ListBox Or TypeOf ctl Is CheckBox Then
If Left(ctl.ControlSource, 1) <"=" Then
ctl.Value = Null
End If
End If
Next
Exit_BTN_Clear_All_Click:
Exit Sub
Err_BTN_Clear_All_Click:
MsgBox Err.Description
Resume Exit_BTN_Clear_All_Click
End Sub
************************************************** ************************************************** **********