R
Rick
I have an Access 2007 .accdb (testing at the moment) wherein the FE is on a
Terminal Services server (Windows 2003) running in the Access 2007 Run-time
environment and the BE is on another Windows 2003 server.
This app is accessed by many Users and is working well - up to the point of
exiting. I get the error message: 'Execution of this application has been
stopped due to a run-time error. The Application can't continue and will be
shut down.' At which point the User clicks OK and the shutdown proceeds
normally. Is there a better way to do this?
Thanks.
Here is the code:
' Exit the application.
Case conCmdExitApplication
'close open forms
If IsLoaded("frmClients") Then
DoCmd.Close acForm, "frmClients", acSaveYes
End If
'update the Session information
strSQL = "INSERT INTO tblLogOn (LogOnName, LogOnComputer, LogOnDateTime,
LogOffDateTime)" _
& "VALUES ('" & gbUserName & "', '" & gbComputerName & "', " &
Format(gbLogOnDateTime, JetDateTimeFmt) & ", " & Format(Now, JetDateTimeFmt)
& ")"
dbsBITO.Execute strSQL
'CloseCurrentDatabase
rs.Close
Set rs = Nothing
Set con = Nothing
DoCmd.CloseDatabase
Terminal Services server (Windows 2003) running in the Access 2007 Run-time
environment and the BE is on another Windows 2003 server.
This app is accessed by many Users and is working well - up to the point of
exiting. I get the error message: 'Execution of this application has been
stopped due to a run-time error. The Application can't continue and will be
shut down.' At which point the User clicks OK and the shutdown proceeds
normally. Is there a better way to do this?
Thanks.
Here is the code:
' Exit the application.
Case conCmdExitApplication
'close open forms
If IsLoaded("frmClients") Then
DoCmd.Close acForm, "frmClients", acSaveYes
End If
'update the Session information
strSQL = "INSERT INTO tblLogOn (LogOnName, LogOnComputer, LogOnDateTime,
LogOffDateTime)" _
& "VALUES ('" & gbUserName & "', '" & gbComputerName & "', " &
Format(gbLogOnDateTime, JetDateTimeFmt) & ", " & Format(Now, JetDateTimeFmt)
& ")"
dbsBITO.Execute strSQL
'CloseCurrentDatabase
rs.Close
Set rs = Nothing
Set con = Nothing
DoCmd.CloseDatabase