Button for clearing data in access form

  • Thread starter Thread starter amitbadgi
  • Start date Start date
A

amitbadgi

Hi guys, I have created a form in access and want to addin a button,
which onclicking clears the form of anyentered values.
There are 5 text fields for user input and if a user clicks this
button, then it should clear all the text fields(if any values are
entered by the user). Thanks
 
If the text boxes are bound to an underlying record source, then this:

DoCmd.GoToRecord acForm, Me.Name, acNewRec

This goes to a new record, and by default all values are blank (unless the
table and/or form specifies defaults).

If the text boxes are not bound, simply do this:

TextBox1 = Null
TextBox2 = Null

etc.
 
Back
Top