J
JohnC
RE: Access 2003
My application has been split and the front end runs on client PCs with the
back end on a LAN file server. Also I have an updater routine that copies
an updated client from the LAN file server to the client PCs when needed. I
keep the client front end on the LAN server for distribution purposes. The
problem is that occasionally, user's get confused and go to the LAN file
server and run the application from the front end file that is on the LAN
server. I want them to use their client front end on their PC. I plan to
add code to check for this (see below). Is there a better way to do this?
John
Sub ClientLocal()
On Error GoTo Err_ClientLocal
' Quits if the user launches the application from a LAN file.
' Should launch from a client on users PC.
Dim strDrive As String
Dim strMessage As String
Dim strTitle As String
strDrive = Left(CurrentDb.name, 1)
strTitle = "Login Error"
strMessage = "It appears that you have launched the application from a
LAN file location."
strMessage = strMessage & "Please consult your system administrator.
Application terminating."
If strDrive > "D" Then
MsgBox strMessage, vbCritical, strTitle
Quit
End If
Exit_ClientLocal:
Exit Sub
Err_ClientLocal:
MsgBox Err.Description
Resume Exit_ClientLocal
End Sub
My application has been split and the front end runs on client PCs with the
back end on a LAN file server. Also I have an updater routine that copies
an updated client from the LAN file server to the client PCs when needed. I
keep the client front end on the LAN server for distribution purposes. The
problem is that occasionally, user's get confused and go to the LAN file
server and run the application from the front end file that is on the LAN
server. I want them to use their client front end on their PC. I plan to
add code to check for this (see below). Is there a better way to do this?
John
Sub ClientLocal()
On Error GoTo Err_ClientLocal
' Quits if the user launches the application from a LAN file.
' Should launch from a client on users PC.
Dim strDrive As String
Dim strMessage As String
Dim strTitle As String
strDrive = Left(CurrentDb.name, 1)
strTitle = "Login Error"
strMessage = "It appears that you have launched the application from a
LAN file location."
strMessage = strMessage & "Please consult your system administrator.
Application terminating."
If strDrive > "D" Then
MsgBox strMessage, vbCritical, strTitle
Quit
End If
Exit_ClientLocal:
Exit Sub
Err_ClientLocal:
MsgBox Err.Description
Resume Exit_ClientLocal
End Sub