ACCESS 2002 runtime question

T

Terri

I am a beginner at Runtime applications. I've been able
to figure out and fix all my problems to this point. Now
when I exit my ACCESS application with a button on my
menu screen, when I look at the Task Manager it shows
msaccess is still running on the machine. If I open my
application again and exit, it then shows msaccess
running twice.

What is causing this?

Thanks in advance for any help.
 
J

Jim Carlock

Have you created an object that isn't released inside of
Access? Not sure what you mean by Access 2002 runtime.

I'm assuming that you mean that Access is set up to run
something automatically when a particular file is opened.

If you're creating a lot of forms, you might want to try to
loop through the forms and close each one... I know this is
possible in a VB application, and I'm pretty sure it's doable
in an Access application as well.

Dim fld As Form
For Each frm in Forms
Unload frm
Set frm = Nothing
Next frm

Will need a little more information to be able to be more
specific.
--
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.


I am a beginner at Runtime applications. I've been able
to figure out and fix all my problems to this point. Now
when I exit my ACCESS application with a button on my
menu screen, when I look at the Task Manager it shows
msaccess is still running on the machine. If I open my
application again and exit, it then shows msaccess
running twice.

What is causing this?

Thanks in advance for any help.
 
J

Jim Carlock

How are you shutting down the application? If you could post the code
here, we'll be able to direct you rather than misdirect you a little better.

<g>

--
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.


I have an Access 97 application that runs marvelously. I have converted it
to Access 2002, and attempting to change this to a Runtime application,
where my users don't have to have Access 2002 installed on their machines.

When testing the runtime application, when I exit Access it appears to close
properly. However, when I look at the Task Manager Msaccess is still
running. If I open and exit the application multiply times, Msaccess will
be listed several time on the Task Manager.

I am trying to find out why this is happening, as I don't need anymore Tasks
running on some of these machines.

----- Jim Carlock wrote: -----

Have you created an object that isn't released inside of
Access? Not sure what you mean by Access 2002 runtime.

I'm assuming that you mean that Access is set up to run
something automatically when a particular file is opened.

If you're creating a lot of forms, you might want to try to
loop through the forms and close each one... I know this is
possible in a VB application, and I'm pretty sure it's doable
in an Access application as well.

Dim fld As Form
For Each frm in Forms
Unload frm
Set frm = Nothing
Next frm

Will need a little more information to be able to be more
specific.
--
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.


I am a beginner at Runtime applications. I've been able
to figure out and fix all my problems to this point. Now
when I exit my ACCESS application with a button on my
menu screen, when I look at the Task Manager it shows
msaccess is still running on the machine. If I open my
application again and exit, it then shows msaccess
running twice.

What is causing this?

Thanks in advance for any help.
 
T

Terri

I have a menu screen (designed on a form not as a Switchboard) with a button for the purpose of exiting the Access application. The code behind it writes to a log file to let me know what time the user logged off, then
Docmd.Clos
Docmd.Exi

In my 97 application this works fine, but not in this. It works correctly when I use the 2002 application, but not when I use a machine with the runtime application loaded. I have also removed all the Access 97 components for this computer

Thanks for your help. Following is the Subroutine for the [EXIT] button

Private Sub Exit_Click(
On Error GoTo err_Exit_Clic

TCRSecurityTable.Index = "PrimaryKey

TCRSecurityTable.Seek "=", CurrUse

If TCRSecurityTable.NoMatch The
Err.Description = "Lost UserId
GoTo err_Exit_Clic
Els
TCRSecurityTable.Edi
TCRSecurityTable.SecuirtyWorkstation = Nul
TCRSecurityTable.SecuritySignedOn = Fals
TCRSecurityTable.Updat
UserError = "User Logged Off
LogSecurityError CurrProc, CurrUser, TCRSecurityTable.SecurityPassword, UserError, SaveWkst
End I

DoCmd.Clos
DoCmd.Qui

Exit_Exit_Click
Exit Su

err_Exit_Click
CurrProc = "Exit_Click

If Err <> 0 The
LogError CurrProc, Err.Number, Err.Description, CurrForm.Name, Ope
Msg = "An error has occured, please print the error log to see the details.
MsgBox Msg, MB_STO
End I

Resume Exit_Exit_Clic

End Su
 
J

Jim Carlock

I'm thinking that the DoCmd.Close doesn't kill the form?

That operates on the form in question, correct?

If that's the case, try setting the form to nothing...
Set frmName = Nothing and drop the DoCmd.Close. It's
hard to see exactly what that's closing.

--
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.


I have a menu screen (designed on a form not as a Switchboard) with a button
for the purpose of exiting the Access application. The code behind it
writes to a log file to let me know what time the user logged off, then
Docmd.Close
Docmd.Exit

In my 97 application this works fine, but not in this. It works correctly
when I use the 2002 application, but not when I use a machine with the
runtime application loaded. I have also removed all the Access 97
components for this computer.

Thanks for your help. Following is the Subroutine for the [EXIT] button.

Private Sub Exit_Click()
On Error GoTo err_Exit_Click

TCRSecurityTable.Index = "PrimaryKey"

TCRSecurityTable.Seek "=", CurrUser

If TCRSecurityTable.NoMatch Then
Err.Description = "Lost UserId"
GoTo err_Exit_Click
Else
TCRSecurityTable.Edit
TCRSecurityTable.SecuirtyWorkstation = Null
TCRSecurityTable.SecuritySignedOn = False
TCRSecurityTable.Update
UserError = "User Logged Off"
LogSecurityError CurrProc, CurrUser,
TCRSecurityTable.SecurityPassword, UserError, SaveWkstn
End If

DoCmd.Close
DoCmd.Quit

Exit_Exit_Click:
Exit Sub

err_Exit_Click:
CurrProc = "Exit_Click"

If Err <> 0 Then
LogError CurrProc, Err.Number, Err.Description, CurrForm.Name, Oper
Msg = "An error has occured, please print the error log to see the
details."
MsgBox Msg, MB_STOP
End If

Resume Exit_Exit_Click

End Sub
 

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