Clear Fields Button on Bound Form

G

Guest

Good Day..

I am back at it with my forms. However, this question is going to sound
rather ignorant but I promise you that it is not intended to be. I have a
form in which the fields are all bound to the primary table of my database.
All of my fields for this table are required with the exception of 1 field.
Currently, I have a 'Delete' button on the form but it errors due to the fact
that I may have entered data in 1 field but not in all of the other required
fields. I would like to have a button that resets all of the fields back to
their default if a user decides to not complete the record they started.
Unfortunately, I have had no luck in locating code to create such an item.
Would any of you fine ladies and gents have a solution?

I promise you.. Killing my end users is not an option here.

Thanks,
Jim
 
G

Guest

The command: Me.Undo

It works but it does not clear the fields as I need it to. The fields would
ultimately need to be reset in order to bypass the requirement of the table.
If you use undo then it still wants the required fields filled when you quit
the form.

Jim
 
G

Guest

Alright... I'm lost but it now works the 2nd time I tried it. Sorry about
that.

Jim
 
M

Marshall Barton

That said:
I am back at it with my forms. However, this question is going to sound
rather ignorant but I promise you that it is not intended to be. I have a
form in which the fields are all bound to the primary table of my database.
All of my fields for this table are required with the exception of 1 field.
Currently, I have a 'Delete' button on the form but it errors due to the fact
that I may have entered data in 1 field but not in all of the other required
fields. I would like to have a button that resets all of the fields back to
their default if a user decides to not complete the record they started.
Unfortunately,


This situation is so common that Access provides the Esc key
to undo data entry. Hitting Esc twice undoes all the edits
to the entire record. (Hitting it once undoes the single
value being entered/changed.)

If that's too complicated for your users, you can do the
same thing in a button's Click event procedure:

Me.Undo
 

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

Top