Darryl Collins
Darryl.Collins at coles.com.au
Wed May 14 00:23:49 CDT 2008
Thanks Steve, I have just got this figured out. '------- start code ------------- Private Sub cmdTL_Click() If Me.Dirty Then RunCommand acCmdSaveRecord End If Call OpenTL_Form DoCmd.Close acForm, "frm_FYP_APLID_HLSU", acSaveYes End Sub ' -------- end code --------- Many thanks :) Darryl. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Steve Schapel Sent: Wednesday, 14 May 2008 3:17 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Closing a Form using VBA Darryl, Try it like this: DoCmd.Close acForm, Me.Name Regards Steve Darryl Collins wrote: > aaaah, Hi everyone. > > I am sure this is dead simple, but I keep thinking in Excel.VBA rather than Access.VBA so I get stuck. urrrgh. > > On Form1 I have a button that opens Form2. Once Form2 is open I want Form1 to close itself and save any data that maybe there. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com This email and any attachments may contain privileged and confidential information and are intended for the named addressee only. If you have received this e-mail in error, please notify the sender and delete this e-mail immediately. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. It is your responsibility to check this e-mail and any attachments for viruses. No warranty is made that this material is free from computer virus or any other defect or error. Any loss/damage incurred by using this material is not the sender's responsibility. The sender's entire liability will be limited to resupplying the material.