|
-
May 14th, 2000, 07:48 PM
#1
Thread Starter
New Member
My vb pgm runs multiple queries and a report from within an
Access mdb but I can't get the vb pgm to close automatically when it's done. I have to click the close (X) button on the form to end it.
Any ideas?
On Error GoTo error1
'Center form on screen
Left = (Screen.Width - Width) \ 2
Top = (Screen.Height - Height) \ 2
Set msacs = New Access.Application
msacs.OpenCurrentDatabase "F:\User Files\holly\Access\Expediting.mdb"
msacs.Visible = False
msacs.DoCmd.RunMacro "RunReport"
msacs.CloseCurrentDatabase
Unload Me
error1:
-
May 15th, 2000, 12:50 AM
#2
Guru
Assuming msacs is an instance of an Access Application object, put this at the end of your code
set msacs = nothing
to release the object reference to the application object
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
|