Get rid of a MS Access Process after closing MS Word

A

alborg

Hi there:

When I open up a my MS Word based electronic medical record ("EMR") I have
to open up an instance of MS Access where the backend tables are situated. If
you do a CONT-ALT-DEL then click on "Processes" you will find "MS ACCESS".

The problem I am having is that once MS Word closes, the instance of MS
ACCESS is still open. If I open up my program, another instance of MS ACCESS
opens, and if I keep doing that throughout the day, I could end up with
dozens of MS ACCESS instances, each taking up RAM memory.

How can I turn them off/remove them?
 
A

alborg

Actually I figured it out... found the fix in an Excel website:

Private Sub CommandButton8_Click()
'Check if Access is running
'I need to check if Access is running and then Quit the aplication. If the
create
'option is used to open an instance, the NetOffice add-in is not
included and it is needed
'for this particular module. All other modules do not require the
NetOffice add-in and
'can use the normal CreateObject function... alborgggg
Dim accessword As Access.Application
Dim Accesswasnotrunning As Boolean
On Error Resume Next
Set accessword = GetObject(, "Access.Application")
If Err = 0 Then
'Access was running
Accesswasnotrunning = True
accessword.Quit
Set accessword = Nothing
Else
'Access was NOT running
Set accessword = CreateObject("Access.Application")
Accesswasnotrunning = False
End If
End Sub

If you click on the clickbutton, the MS ACCESS instance disappears.

Thanks anyhow...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top