Hi All:
I have a multi-user database that is split into FE/BE. In order to perform certain tasks in the database, I need to have exclusive access to it. So, I either have to go around and close the DB myself or call the users to ask them to exit. I found this on the Microsoft Knowledge base...Remote App Shutdown
The code line that i think is the problem is the red...
However, I don't think that the code is able to access the network because it acts as if the file for which it is checking isn't there or named incorrectly because it shuts the application down regardless of whether or not the file is named correctly. Otherwise, it works perfectly.
Do you think or know that the app can't access our server? I am stumped on this one.
Thanks in advance for any suggestions.
B
I have a multi-user database that is split into FE/BE. In order to perform certain tasks in the database, I need to have exclusive access to it. So, I either have to go around and close the DB myself or call the users to ask them to exit. I found this on the Microsoft Knowledge base...Remote App Shutdown
The code line that i think is the problem is the red...
Code:
Private Sub Form_Timer()
On Error GoTo Err_Form_Timer
[COLOR=Red] Dim strFileName As String
strFileName = Dir("\\Server\Users\CCA_CCS_TestingDatabase\MyData\chkfile.ozx")[/COLOR]
If boolCountDown = False Then
' Do nothing unless the check file is missing.
If strFileName <> "chkfile.ozx" Then
' The check file is not found so
' set the count down variable to true and
' number of minutes until this session
' of Access will be shut down.
boolCountDown = True
intCountDownMinutes = 2
End If
Else
' Count down variable is true so warn
' the user that the application will be shut down
' in X number of minutes. The number of minutes
' will be 1 less than the initial value of the
' intCountDownMinutes variable because the form timer
' event is set to fire every 60 seconds
intCountDownMinutes = intCountDownMinutes - 1
DoCmd.OpenForm "frmAppShutDownWarn"
Forms!frmAppShutDownWarn!txtWarning = "The database will be shut down in approximately " & intCountDownMinutes & " minute. Please save all work."
If intCountDownMinutes < 1 Then
' Shut down Access if the countdown is zero,
' saving all work by default.
Application.Quit acQuitSaveAll
End If
End If
Exit_Form_Timer:
Exit Sub
Err_Form_Timer:
Resume Next
End Sub
Do you think or know that the app can't access our server? I am stumped on this one.
Thanks in advance for any suggestions.
B
Last edited by a moderator: