[AccessD] Closing form problem

Kaup, Chester Chester_Kaup at kindermorgan.com
Thu Jan 7 07:22:46 CST 2016


Thank you for the insight.

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Wednesday, January 06, 2016 5:53 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Closing form problem

Why the acSaveYes?

That means save any changes to the form, not changes to the data.


--
Stuart
On 6 Jan 2016 at 15:05, Kaup, Chester wrote:

> I have a data entry form tied to a table. When the data entry has been 
> made in the last text box I want to close the form. I have the 
> following event procedure on the exit event of the text box. I get an 
> error message. I am not seeing what I am doing wrong. Thanks.
> 
> RunTime Error 2585
> This action can't be carried out while processing a form or report 
> event.
> 
> Private Sub Not_defined_Exit(Cancel As Integer)
>     DoCmd.Close acForm, "frm Cisco Sands Input", acSaveYes End Sub
> 
> I tried adding this but it did not help
> 
> Private Sub Not_defined_AfterUpdate()
>     DoCmd.RunCommand acCmdSaveRecord
> End Sub
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list