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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top