reopen a form in a current form

xcao

Registered User.
Local time
Today, 00:01
Joined
Nov 25, 2003
Messages
40
After I save the record, I would like to clear all the data in the form and allow use to add another new record.
I use code like me.mycontrol.myfield=null, it sets all text box to null, but the selectedlist box still filled in.

The only way is to close the form and reopen the form. I have some code in the open form event. This makes the form displayed correctly.

But this is really not convenient, the user have to close the from and reopen the form in order to see everything refreshed again amd enter new record
Is there any way that I can use a button in the current form that close the form and reopen the form, which actually lookes reset the page.?
Thanks
 
Write a macro which

Close Form
Open Form

Run it from a command button on your form
Label the button "Clear Form"
 
Use
'save the current record
DoCmd.RunCommand acCmdSave
'goto a new record
DoCmd.GoToRecord , , acNewRec
 

Users who are viewing this thread

Back
Top Bottom