Mik3
07-28-2003, 12:40 AM
Is there a command or something that would clear all entries in a form (as if the user has pressed Esc)?
|
View Full Version : Clear Mik3 07-28-2003, 12:40 AM Is there a command or something that would clear all entries in a form (as if the user has pressed Esc)? IMO 07-28-2003, 12:46 AM Put this code in the Click event of a button DoCmd.RunCommand acCmdUndo IMO Mik3 07-28-2003, 01:08 AM 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? :) IMO 07-28-2003, 01:13 AM 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: Mik3 07-28-2003, 01:29 AM 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. IMO 07-28-2003, 01:46 AM The code to add a new record is... DoCmd.GoToRecord , , acNewRec To close the current form... DoCmd.Close To close another form that is open... DoCmd.Close acForm, "NameOfOtherForm" IMO |