I think you'd probably be better off asking in a Dot Net-related group, such
as microsoft.public.dotnet.languages.vb.data
This doesn't look like an Access issue to me.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Rob Hughes" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I am writing an external app that utilizes. The app needs to be able to run
> repeatedly, but I am having a problem because Access will not close. When
> .Quit is called, it pops up a blank Access window, which will not close by
> normal means, only by ending the process in Task Manager.
>
> Here is the applicable Access code, in VB.NET:
>
> Dim appAcc As New Access.Application
> appAcc.Visible = False
> appAcc.OpenCurrentDatabase(dbname, True)
> appAcc.DoCmd.DeleteObject(acTable, "ArcSumm")
> appAcc.DoCmd.DeleteObject(acTable, "zip_table")
> appAcc.DoCmd.DeleteObject(acTable, "ArcCover")
> appAcc.DoCmd.TransferDatabase(acImport, "dBase 5.0", dbloc + pnum,
> acTable,
> "ArcSumm", "ArcSumm")
> appAcc.DoCmd.TransferDatabase(acImport, "dBase 5.0", dbloc + pnum,
> acTable,
> "ArcCover", "ArcCover")
> appAcc.DoCmd.TransferDatabase(acImport, "dBase 5.0", dbloc + pnum,
> acTable,
> "ArcZips", "zip_table")
> appAcc.DoCmd.RunMacro("webCover")
> Dim summ As DAO.Recordset
> summ = appAcc.CurrentDb.OpenRecordset("ArcSumm")
> If summ.RecordCount = 0 Then
> appAcc.DoCmd.RunMacro("DoEverythingWebNoHaz")
> Else
> appAcc.DoCmd.RunMacro("DoEverythingWeb")
> End If
> summ.Close()
> summ = Nothing
> appAcc.DoCmd.OpenReport("Definitions", Access.AcView.acViewNormal) 'dummy
> report to flush the pdf file
> appAcc.DoCmd.Close(acReport, "Definitions", Access.AcCloseSave.acSaveNo)
> appAcc.CloseCurrentDatabase()
> appAcc.Quit(Access.AcQuitOption.acQuitSaveNone)
> appAcc = Nothing
>
> I have tried to ensure that everything is closed out, and yet it persist
> in
> popping up the Access window. If I try to run the app again, it fails
> because it cannot access the database.
>
> Can anyone advise me what to do?
>
>