You can't exit MS Office Access Now

Hi,

I have an access database that is designed to run a report and create a pdf 
file.  I have an autoexec macro that will open the form and print it.  My 
final step in the autoexec macro is to exit the application.  I placed a 
delay so that the database would have time to create the pdf file from the 
report.  If I don't have this in, it closes the program before it is written. 
 I wrote a module and stuck the step into my autoexec macro before the exit 
step.  The code is below:
------------------------------------------------------------------------------
Public Function testCDO()

    
    Dim Finish As Single
    Finish = Timer + 60
    DoEvents
    Do Until Timer >= Finish
    Loop
    
    
End Function
-----------------------------------------------------------------
I am getting an error that says "You Can't Exit MS Office Access Now.  If 
your running a VB module that is using OLE or DDE, you may need to interrupt 
the module.  The program does generate the pdf file but I have to mannualy 
click OK to exit.  Can someone help?

Thanks,


-- 
Chuck W
0
Utf
11/27/2007 10:52:41 PM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
2286 Views

Similar Articles

[PageSpeed] 0

Chuck,

My first guess would be to create a separate routine to Quit the Access 
application and then call that routine after your Loop statement.  Let me 
know if it works.


Public Function testCDO()
 
     Dim Finish As Single
     Finish = Timer + 60
     DoEvents
     Do Until Timer >= Finish
     Loop
     
     Call subQuitApplication
 End Function



Public Sub subQuitApplication()
    Application.Quit
End Sub



Ken

"ChuckW" wrote:

> Hi,
> 
> I have an access database that is designed to run a report and create a pdf 
> file.  I have an autoexec macro that will open the form and print it.  My 
> final step in the autoexec macro is to exit the application.  I placed a 
> delay so that the database would have time to create the pdf file from the 
> report.  If I don't have this in, it closes the program before it is written. 
>  I wrote a module and stuck the step into my autoexec macro before the exit 
> step.  The code is below:
> ------------------------------------------------------------------------------
> Public Function testCDO()
> 
>     
>     Dim Finish As Single
>     Finish = Timer + 60
>     DoEvents
>     Do Until Timer >= Finish
>     Loop
>     
>     
> End Function
> -----------------------------------------------------------------
> I am getting an error that says "You Can't Exit MS Office Access Now.  If 
> your running a VB module that is using OLE or DDE, you may need to interrupt 
> the module.  The program does generate the pdf file but I have to mannualy 
> click OK to exit.  Can someone help?
> 
> Thanks,
> 
> 
> -- 
> Chuck W
0
Utf
11/28/2007 9:03:02 PM
Reply:

Similar Artilces:

How to modify UI lables/captions in the existing MS CRM Menu's
Hi I am new to customization of the MS CRM UI. Can anyone guide me as to how to go about customizing the MS CRM UI lables/captions that are there on the various forms. Any information will be greatly appreciated. Thanks Amit Reddy Log into CRM with a user that has CRM System Administrator role assigned to it. Go to the Home Page in CRM. Click the Settings tab on the left, then click "System Customization." You will get a list of the different entities in CRM: leads, accounts, cases, contacts, opportunities, etc. Click the entity that you wish to customize. For example, click...

Can't Access Contacts
When I click on contacts they are there but when I click on "TO" when sending an email the error message is: The address list could not be displayed. Anyone, please? Pat -- Pat Geddes "Pat Geddes" <Pat.Geddes.5a8bfb3@outlookbanter.com> wrote in message news:Pat.Geddes.5a8bfb3@outlookbanter.com... > > When I click on contacts they are there but when I click on "TO" when > sending an email the error message is: The address list could not be > displayed. Anyone, please? > Asked and answered here HUNDREDS of times...

how to log in to office online
how do access my microsoft office basics. have tried through msn and cannot get on. thank you If you are refering to Office Live Basics please go here www.officelive.com -- Chester C. Coronel Junior BSIT Student University of Asia and the Pacific, Philippines Read the StudentEmpowered Blog!http://msforums.ph/blogs/chestercoronel "romanticingpoet" wrote: > how do access my microsoft office basics. > > have tried through msn and cannot get on. > > thank you ...

MS 2005 & Vista
Hi have just bought a new computer running Vista. I have loaded Money 2005 Standard. I always log onto Windows as an Administrator. When Money starts it asks me to log off and log back on as a part of the Administrator Group. There don't seem to be Groups in Vista, so I can't oblige and so can't get the patch and so can't open my Mny file, which was created by patched Money 2005 running on XP. What to do? -- John In microsoft.public.money, JohnMatt wrote: >Hi have just bought a new computer running Vista. I have loaded Money 2005 >Standard. > >I always ...

out of office assistant in Outlook 2002?
I have outlook 2002 for small business and the tools menu doesn't have the out of office assistant and I can't get the exchange add-in to work. Can anyone suggest what the problem/solution is to finding or adding the out of office assistant? two things must happen before you see the out of office assistant 1) the exchange extensions must be enabled under tools | options | other | advanced options | addin manager and 2) you must connect to a microsoft exchange server via the exchange transport "mbrown" <mjb@mjbrownlaw.com> wrote in message news:04c601c36c3c$4b5f...

how do i unsuscribe from microsoft office emails
ive been receivin emails like evry two days and i want to stop it. Update your profile on Microsoft.com. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. ALWAYS post your Outlook version. How to ask a question: http://support.microsoft.com/KB/555375 After furious head scratching, mide93 asked: | ive been receivin emails like evry two days and i want to stop it. ...

Mailbox move failed can't accessmailbox now
Ran out of disk space during a move from 5.5 to 2003 and now can't login to mailbox. Mailbox is there and looks fine. Get this error when I try to move it again "The MAPI call 'OpenMsgStore' failed with the following error" Also can't log in to it from outlook. Seems like something didn't get updated when the target server crashed. Any ideas? thanks! See if this applies: http://support.microsoft.com/kb/299473/en-us -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "bk" <jhogan@bizank.com> wrote...

Office 2004 for Mac
Hi, Does anyone have information on the capabilities and functionality that will be provided in Entourage 2004? Also, what is the release date for Office 2004 for the MAC? ..The Mactopia web site doesn't provide much information at all. Regards Trevor In article <c0eh06$1mlb$1@si05.rsvl.unisys.com>, "trmbr" <trmbr@hotmail.com> wrote: > Does anyone have information on the capabilities and functionality that will > be provided in Entourage 2004? Also, what is the release date for Office > 2004 for the MAC? > .The Mactopia web site doesn't provide ...

Outlook 2003 unable to access menu by right clicking on message
We have recently upgraded from Office 2002 to Office 2003 on Windows 2000 PCs. Two users are unable to right click on messages to get the menu options (junk e-mail, etc.). It was working for them initially but stopped functioning. We have tried to uninstall and run Office Clean but were unable to resolve. It seems to work if they select multiple messages at one time but cannot right click on single messages to access the menu. A hour glass flashes and nothing happens. Thank you in advance for any suggestions you may have. Jenny ...

ms outlook express 5.0
I can receive messeges but can not send any !!!!! Please let me know what is wrong with my outlook express .... if anybody knows ???? Sounds like you don't have your SMTP server settings configured correctly. You should contact your ISP and confirm the settings. This newsgroup is for support of Outlook 97, 98, 2000, 2002 & 2003 from the Office family for Intel PCs. For Outlook Express (OE) support try posting in one of these newsgroups: microsoft.public.inetexplorer.ie4.outlookexpress for OE 4.x microsoft.public.windows.inetexplorer.ie5.outlookexpress for OE 5.x microsoft.public.wi...

Compact now not compacting
When I select my personal folder and try do a 'compact now' it says its compacting but when I check the size it hasnt done anything. The file size is just over 700mb and when I manually do it using XP zip it halves the size! What am I missing here? Why aint Outlook compacting my personal folder? Thanks, Grant Compact Now and zipping a file isn't the same. When you Compress a pst-file it removes the "white spaces" and allows you to run the pst-file. When you zip a file you cannot directly access the file anymore. Compress Now should come up with a file size just a ...

HTTP Error when accessing properties of Public Folders
Greetings.... First, thanks for the previous help I have received in this forum. ;) I will try to keep this brief, but afraid it may require more...........Exch2k Server with all service packs up to date. Moving accounts and Public Folder structure from one Exch2k server to another. Will be removing the older of the two from the domain when done. Right-click on the Public Folder to look at the properties of the folder to setup replication of the folder and get the following error message: The HTTP Service used by Public Folders is not available, possible causes are that Public Stor...

Out of office replys not working correctly
Hello, We have a few users who have the automatic out of office replys turned on and they work fine from within the company. However, they dont seem to be responding to outside mail such as yahoo.com, gmail.com or hotmail.com. Is there a setting in exchange 2003 server that would prohibit out of office replys from going out to external mail? Thanks in advance... Yes, OOFs to the Internet are disabled by default. Global Settings/Internet Message Formats/Properties/ click the checkbox to enable. On Mon, 08 Nov 2004 15:55:28 -0800, Psycho <Psycho@Psychotic.net> wrote: >Hello...

Access 2003 linked tables causes read-only
Hi A weird one - I have an Access 2k mdb set with linked tables. Ive opened the set under Access 2003. If the link is to the c: drive (where the functions are) all is OK, but if I put the mdb with the tables in on a net drive (eg X:\.....) the tables become read only and I can find how to stop this.. Any help anyone, please???!!?? thanks Jim McDonald What permissions do you have on the folder where the mdb has been placed? You must have Change permissions (Read, Write, eXecute and Delete) on the folder, not just the file. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele ...

where do you go in MSFT to do an office diagram,
how do I do this kind of diagram, with internal office layout, etc. johnplanner wrote: > how do I do this kind of diagram, with internal office layout, etc. I don't know much about Microsoft's internal corporate structure, so I don't know where inside MSFT you would go to have an office diagram created. If you mean which Microsoft product to use, then Visio is probably your best bet, although even that isn't really the right product for the job. Microsoft doesn't create any building design/architecture products. -- Ed Bennett - MVP Microsoft Publisher http://ed...

Setting the Startup Options for an Access 2007 database using VBA
Afternoon everyone, I'm trying to use the information from an MSDN page of roughly the same title (Setting Startup Options Programmatically in Access 2000, http://msdn.microsoft.com/en-us/library/aa140020(office.10).aspx) to setup the startup options of my database. Firstly, I don't know whether this option should be placed in a module or event (like Form_Load). Secondly, I'm not too sure that I have the code correctly written down: Private Sub Form_Load() Dim dbs As CurrentProject Set dbs = Application.CurrentProject dbs.Properties....

Can access it's shared folders, but cannot access the computer directly through network
Need help from all the techies, I have a Windows XP Pro SP2 PC which is made as a server. In the network I have another 5 pc (Windows XP Pro SP2) connected to this server as workstations. From all the workstations, I am *able to open all the shared folders of the server*, but when I tried in the *Run* with *\\server*, I'd get an error saying " *access is denied.* ". I cannot gain access to the server but can open it's shared folders. I have scanned for viruses/spywares/malwares. All cleaned up, but the problem still persists. Can anyone help me? Thank you. ...

with Publisher or Office.Will I be able to access old files docume
I am frustrated with my Open Office org. program for many reasons. I would like to use Publisher or Office or? Will I be able to access, email, documents etc files previously made on another program if I download Publisher or Office or ? Erica wrote: > I am frustrated with my Open Office org. program for many reasons. > I would like to use Publisher or Office or? > Will I be able to access, email, documents etc files previously made on > another program if I download Publisher or Office or ? Office applications cannot open OpenDocument files. You will have to convert them to O...

MS OUTLOOK OFFICE SBE 2003
Hi, I am not able to perform actions like ReplyAll, Updating a task item.. on my outlook 2003, am getting the following error - The messaging interface has returned an unknown error if the problem persists restart outlook. I have unistalled OFFICE SBE 2003 and reinstalled it. The problem persists. Anybody knows of a solution? Roger Bertrand EggHeadCafe - .NET Developer Portal of Choice http://www.eggheadcafe.com I often use my MS Outlook and almost every time I don't have any problems with my tool. But once I opened my software and noticed a very unpleasant thing,exacter some of my c...

User Defined fields should be accessible from shipping address
The current relationship does not allow for the customer to use the user defined fields from the ship to address. The reason for GP not pulling the information for the shipping address in the Customer Address Master File (RM00102) is because it is already pulling the information in the Sales Transaction Work tables (SOP10100). Unlike the billing information, the shipping address can already be seen in the SOP10100 table and this is why the table relationship between the RM00102 and SOP10100 tables is based on the Bill to Address. There should be an additional relationship so you can p...

Where do I find "save as..." in MS Office 2007 ?
Sorry, but I did not found "save as..." menu in Office 2007. I only found in the upper left corner a flopy icon which represent a "save" but not a "save as...." So where is "save as..." (with files selction dialog) hidden in Office 2007? Camille Click the Office button (the round "pizza icon" in the upper left corner of the screen) and then click Save As. -- Stefan Blom Microsoft Word MVP "Camille Petersen" <cpet_magnus@hotmail.com> wrote in message news:4baf94cc$0$6768$9b4e6d93@newsspool3.arcor-onlin...

Change Office Language by User
I think I've read enough in these pages to know that it's not possible to get Office to work in more than one language for a single User (I mean menu commands, dialogs, etc. -- not talking about dictionaries, puntuation, etc.). But does anyone know whether or not Office can be configured in two different languages on the same Mac (Mac mini, 10.4, pre-Intel), one different language for each of two different Users? When my Mac starts up, I have two Users set up, one for me in English, one for my mother-in-law in French. The OS is perfectly comfortable switching back and forth between la...

Program trying to access Outlook
I just upgraded my Office XP Pro from the Microsoft Security site. But now, whenever I try to create a new e- mail message, I get the warning that a program is trying to access e-mail addresses you have stored in Outlook. I click no....ie not allowing this, and the new message window opens. However, I keep getting error messages and requests to report errors to Microsoft. This never happened prior to up Office Upgrade. Any ideas what this is? Thanks. "bill h" said in news:17f7c01c419fa$8dcb5d10$a401280a@phx.gbl: > I just upgraded my Office XP Pro from the Microsoft > Se...

Office for Mac
HI, How many computers can the office for mac X be installed using one cd thanks Terry Terence <terryseqi@yahoo.com> wrote: > How many computers can the office for mac X be installed > using one cd The individual user license permits you to run Office on *one* desktop and *one* laptop, but you can't use them simultaneously. -- Adam Bailey | Chicago, Illinois adamb@lull.org | Finger/Web for PGP & S/MIME adamkb@aol.com | http://www.lull.org/adam/ ...

Cannot access public folders from System Manager
I can't access the public folders using the Exchange System Manager, the error that I get says that it is not implemented(error 501). We had a limited number of folders when we had Ex5.5 and now we have migrated to Ex2K3. We have not had to use them up to now and users that used the public folders can still access them via Outlook. How can I correct this? I need to do this to integrate our new agency management system with email. Hi Frank, About Error 501,pls check this KB http://support.microsoft.com/default.aspx?scid=kb;en-us;839744 -- Jammyù�ٴ� "Frank" <Frank@d...