PC Review


Reply
Thread Tools Rate Thread

Close form then Delete form = Error as "Not Closed'

 
 
=?Utf-8?B?Q2FuIE9mIFdvcm1z?=
Guest
Posts: n/a
 
      21st Feb 2007
As part of my FE interface, I am importing a form from the server to replace
an existing form, updating it with any recent revisions. The issues I am
having though are:

I have the code of frm_B checking a version tag on frm_A when frm_A is
loaded. If the version tag is not current, then I close frm_A, download the
most recent version of frm_A from the network to replace it, then re-open
frm_A.

I have attempted this 2 different ways, and each of them results in the same
error: 'Can't Delete a form that is open'

Method 1:
Close frm_A
DeleteObject (error!)
TransferDatabase
OpenForm

Method 2:
Close frm_A
TransferDatabase (alternate name)
DeleteObject frm_A (error!)
Rename frm_Alt to frm_A

Is there a way of either forcing a close, recognizing an actual close,
etc...?
(There are other issues at stake which keeps me from storing the version
elsewhere)
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      21st Feb 2007
Why not simply replace the front-end? Far less trouble.

Take a look at the free Auto FE Updater Tony Toews has at
http://www.granite.ab.ca/access/autofe.htm

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Can Of Worms" <(E-Mail Removed)> wrote in message
news:4AACFC09-06DD-4092-A892-(E-Mail Removed)...
> As part of my FE interface, I am importing a form from the server to
> replace
> an existing form, updating it with any recent revisions. The issues I am
> having though are:
>
> I have the code of frm_B checking a version tag on frm_A when frm_A is
> loaded. If the version tag is not current, then I close frm_A, download
> the
> most recent version of frm_A from the network to replace it, then re-open
> frm_A.
>
> I have attempted this 2 different ways, and each of them results in the
> same
> error: 'Can't Delete a form that is open'
>
> Method 1:
> Close frm_A
> DeleteObject (error!)
> TransferDatabase
> OpenForm
>
> Method 2:
> Close frm_A
> TransferDatabase (alternate name)
> DeleteObject frm_A (error!)
> Rename frm_Alt to frm_A
>
> Is there a way of either forcing a close, recognizing an actual close,
> etc...?
> (There are other issues at stake which keeps me from storing the version
> elsewhere)



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call user form from ThisWorkbook; close file if form closed =?Utf-8?B?WFA=?= Microsoft Excel Programming 2 20th Jul 2007 07:04 PM
RE: Close Form generates an "Enter Parameter" dialog with form maximiz =?Utf-8?B?UmF5?= Microsoft Access Forms 0 20th Sep 2006 06:51 PM
Close button on a form will not close form - error 2585 - action cannot be carried out while processing a form Angus Comber Microsoft Access 2 19th Jul 2006 12:21 PM
After form is closed, it is still there and crashes when you want to close it again geronimi Microsoft Dot NET Framework Forms 2 21st Jun 2006 12:56 PM
close child form when parent form is closed. =?Utf-8?B?UGF1bA==?= Microsoft ASP .NET 2 24th Nov 2004 10:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:31 PM.