|
-
August 23rd, 1999, 03:43 PM
#1
ClosingAccessApplicationFrom VB
I am creating as Access Application from VB and then am running a macro stored in Access. When I am done running the macro I want to close the Access application that I created and return to the VB code. This is working except the databse I open closes but Access remains open. The only way I can close Access is going into Task Manager and end process. I cant even close Access by hitting the close button. Is there a way to close this? The following is the code that I am currently using. I thought when I set the oAccess = nothing this would close Acccess out of memory??
Dim oAccess As Access.Application
Start = Timer
Do While Timer < Start + 30
DoEvents
Loop
Set oAccess = CreateObject("Access.Application")
oAccess.OpenCurrentDatabase ("E:\Database.mdb")
DoEvents
oAccess.DoCmd.RunMacro "Run Macro"
DoEvents
oAccess.CloseCurrentDatabase
DoEvents
Set oAccess = Nothing
-
August 24th, 1999, 02:04 AM
#2
Re: ClosingAccessApplicationFrom VB
try oAccess.Quit before setting oAccess to Nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|