[AccessD] Closing form problem

Dan Waters df.waters at outlook.com
Wed Jan 6 11:19:01 CST 2016


I was also thinking that you can just comment out this Exit procedure.  If
your form is bound, the data should automatically be saved when the form is
closed, or when you create a new blank record.

I've never worked with forms designated as 'Data Entry' so I'm just
guessing!

Good Luck!

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Kaup, Chester
Sent: Wednesday, January 06, 2016 11:13 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Closing form problem

Is your textbox named 'Not-defined'? 	Name is Not defined

Me.Dirty = False did not work

Thanks for the ideas

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan
Waters
Sent: Wednesday, January 06, 2016 9:12 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Closing form problem

1. Is your textbox named 'Not-defined'?

2. Try replacing DoCmd.RunCommand acCmdSaveRecord with Me.Dirty = False.
Another way to do the same thing - maybe it will work.

Dan


-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Kaup, Chester
Sent: Wednesday, January 06, 2016 9:05 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Closing form problem

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

-- 
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