Gustav Brock
Gustav at cactus.dk
Sat Dec 18 07:38:24 CST 2004
Hi Barbara Open another (temporary) form and kill form1 from that. Then copy the new form1, open form1, close the temp form. /gustav >>> BarbaraRyan at cox.net 18-12-2004 14:26:02 >>> The procedure that is executed replaces objects (i.e., deletes, then imports) from the user's front-end database with objects from a database that I email to them. It works great unless I need to replace "Form1" (the form that contains the pushbutton to execute this procedure). Any ideas on how to accomplish this? Thanks, Barb Ryan ----- Original Message ----- From: "Gustav Brock" <Gustav at cactus.dk> To: <accessd at databaseadvisors.com> Sent: Saturday, December 18, 2004 5:39 AM Subject: Re: [AccessD] Closing a form from a module procedure > Hi Barbara > > Further to Stuart's explanation, why are you deleting the form? Never > heard of that before within an application - why don't you just leave > it? > > /gustav > > >>> BarbaraRyan at cox.net 18-12-2004 02:37:36 >>> > Simply put, in an Access 97 application I have Form1 and Module1. A > pushbutton on Form1 executes a procedure in Module1 which closes Form1 > (DoCmd.Close acForm, "Form1", acSaveNo) and then deletes Form1 > (DoCmd.DeleteObject acForm, "Form1"). However, the Close command does > not appear to be working --- I receive an error on the DeleteObject > command, saying that Form1 is still open. Yet when I run the following > IsLoaded function after the Close command, it returns false (i.e., Form1 > is NOT open).