Sub ClearAllTextBoxes(frmTarget As Form)
For i = 0 To (frmTarget.Controls.Count - 1) Set ctrlTarget = frmTarget.Controls(i) 'If it's a textbox, clear it If TypeOf ctrlTarget Is TextBox Then ctrlTarget.Text = "" End If Next i End Sub 'This clears all the text boxes. You call it by calling ClearAllTextBoxes FormName |