Access form won’t clear after each entry is added

5 pts.
Tags:
Access forms
Microsoft Access
I have an access form with an add button. The button adds the record to the table, but the form won't clear that entry out. How do I clear the entry?

Answer Wiki

Thanks. We'll let you know when a new response is added.

You could reate a “New Record Button” on the form using this code:

<pre>
Private Sub Command20_Click()
On Error GoTo Err_Command20_Click

DoCmd.GoToRecord , , acNewRec

Exit_Command20_Click:
Exit Sub

Err_Command20_Click:
MsgBox Err.Description
Resume Exit_Command20_Click

End Sub
</pre>

Or you could put this code at the end of the code of the button you already have, to automatically clear the form after adding the record to the database.

This <a href=”http://bytes.com/forum/thread660680.html”> site </a> has an interesting discussion dealing with the exact same issue that you have. You might find it helpful.
Good Luck
-Flame

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following