http://www.mail-archive.com/ms_access_professionals@yahoogroups.com/msg10359.html
Bill Mosca
Fri, 10 Mar 2006 10:52:03 -0800
Joe Put an undo command above your code that hides the subform. I'm assuming you are using an option group for the Incident. And I'm calling the sub form SubForm1. Private Sub grpIncident_AfterUpdate() If grpIncident = 2 then me.SubForm1.form.Undo me.SubForm1.form.visible = False ElseIf grpIncident = 1 then me.SubForm2.form.Undo me.SubForm2.form.visible = False ... End Sub Regards, Bill Mosca Founder --- In MS_Access_Professionals@yahoogroups.com, "eliotchs" <[EMAIL PROTECTED]> wrote: > > Hi, > > Can all the values on a subform be reset at once. > Example: > Have a form with subforms,subforms get made visible or not visible > depending on choice of a field(incident) on mainform. > If the user makes a incident choice, starts entering data on the > subform made visible, then decides they are wrong, clicks to change > incident choice, gets another subform, the data from the first choice > is written to the record. > I would like to reset all the values on that subform when it goes from > visible to not-visible. > > Thanks in Advance > Joe