[AccessD] Closing a Form using VBA

Darryl Collins Darryl.Collins at coles.com.au
Wed May 14 19:06:07 CDT 2008



Yep, it is probably not required once I finish building this, but i leave it in there as a safety for me right now so if I make changes and then step thru the code it will save the form design before close.

thanks for the heads up though.

cheers
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 5:56 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Closing a Form using VBA


Darryl,

Are you aware that the acSaveYes argument you have in your code refers 
to saving design changes to the form, and is not related to the data?

Regards
Steve

Darryl Collins wrote:
> 
> 
> 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 ---------
> 
-- 
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.




More information about the AccessD mailing list