Reset Button..

G

Guest

Is there any way to clear all textboxes, comboboxes and checkboxes on the
form with a reset button ? I know we can do it in web programing and wonder
if we can do the same thing in Access??
 
A

Allen Browne

If the form is bound to a table, you can reset it with:
Me.Undo

If you want it to move to the new record as well:
RunCommand acCmdRecordsGotoNew
 
R

Rick Brandt

Appache said:
Actually my form is not bounded to any table..

Well, for an unbound form you could loop thrpugh all controls and set them to
null, but it's usually just as fast to close and reopen the form from code.
Usually that's so fast that the user doesn't see anything but the fields
blanking out.

DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "FormName"
 
G

Guest

Thank you..
--
Thanks


Rick Brandt said:
Well, for an unbound form you could loop thrpugh all controls and set them to
null, but it's usually just as fast to close and reopen the form from code.
Usually that's so fast that the user doesn't see anything but the fields
blanking out.

DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "FormName"
 

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