Thanks for your support.
I don't know why neither of the two sugestions works. I put a break point on
"If Me.Dirty ..." and when the code run, he stoped on it and when hovering on "Me.Dirty" the result was "False" eventhought that all TextBoxes are filled.
So I wrote this: "If Me.Dirty = False Then Me.Undo" . The code worked and the test was good but nothing happenned when running "Me.Undo" .
I did some researches and I found this code and it worked very well.
- Dim ctlC As Control
-
For Each ctlC In Me.Controls
-
If ctlC.ControlType = acTextBox Or ctlC.ControlType = acComboBox Then
-
ctlC.Value = ""
-
End If
-
Next ctlC