Greetings. As indicated by the title, I'm experimenting with a com class for Access, creating the elusive repository for all my various and sundry utility functions.
However...as often happens, that which promises so much is oh so hard to achieve. In this case, the little gizmo does do what I want it to do, but after it's done doing that, it leaves an instance of Access open that can only be closed with Task Manager.
Perhaps the culprit lies in the following code which you can probably tell isn't my first language:
Dim eng As New DAO.DBEngine
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
db = eng.OpenDatabase(theDB)
Dim outfile As New StreamWriter(mydocpath)
Dim sb As StringBuilder = New StringBuilder()
...
blah
blah
blah
...
db.Close()
outfile.Close()
sb = Nothing
outfile = Nothing
eng = Nothing
db = Nothing
qdf = Nothing