Clear

Mik3

Registered User.
Local time
Today, 09:55
Joined
Jul 10, 2003
Messages
60
Is there a command or something that would clear all entries in a form (as if the user has pressed Esc)?
 
Put this code in the Click event of a button
Code:
DoCmd.RunCommand acCmdUndo

IMO
 
Couldn't make that work.
I need to put it inside a macro to clear all items in a form before closing.

Do asteroids orbit planets? :)
 
Why would you need to clear all fields before closing? Don't you want to store the data after input?

IMO

My asteroid does :cool:
 
it works like this..
users fills the form and clicks the button.
a new form opens, which writes values to a table, and closes.
now i want to close the original form as well (or go to a new record), however, since the form is not empty, a new record is being created in the table - and i do not want this. i thought that if i cleared the form before closing it or going to a new record i might solve the problem.
 
The code to add a new record is...
Code:
    DoCmd.GoToRecord , , acNewRec
To close the current form...
Code:
   DoCmd.Close
To close another form that is open...
Code:
    DoCmd.Close acForm, "NameOfOtherForm"
IMO
 

Users who are viewing this thread

Back
Top Bottom