I have designed a multiuser database but the network is slow and sown quite often. Therefore, I am putting each individuals data in a separate file on their hard drive so they can work on it when the network is down. Once the network is operating, the datafiles get joined back on the network drive.
I need the code to determine if the network is up. If it is, the user will go to the network data. If not, he or she can still get to their data.
I tried:
On Error GoTo errorhandler
If Dir("R:\Asset GB1.mdb" = "Asset GB1.mdb" Then
DoCmd.OpenForm "Passwords"
DoCmd.Close acForm, "frm Startup", acSaveNo
End If
Exit Sub
errorhandler:
MsgBox "You are not connected to 'R' drive. You can only work on the data located on this computer. Press OK to continue; Cancel to close Database.", vbOKCancel
DoCmd.OpenForm "Select Area"
"R" is the network drives assigned letter. The code works if the user is in the database before the network goes down. However, if the network is already down, I get a "Network or drive problem" error.
Is there a better way to check the network status and not get this message. The code above is called from the startup form's on open event.
Thanks
I need the code to determine if the network is up. If it is, the user will go to the network data. If not, he or she can still get to their data.
I tried:
On Error GoTo errorhandler
If Dir("R:\Asset GB1.mdb" = "Asset GB1.mdb" Then
DoCmd.OpenForm "Passwords"
DoCmd.Close acForm, "frm Startup", acSaveNo
End If
Exit Sub
errorhandler:
MsgBox "You are not connected to 'R' drive. You can only work on the data located on this computer. Press OK to continue; Cancel to close Database.", vbOKCancel
DoCmd.OpenForm "Select Area"
"R" is the network drives assigned letter. The code works if the user is in the database before the network goes down. However, if the network is already down, I get a "Network or drive problem" error.
Is there a better way to check the network status and not get this message. The code above is called from the startup form's on open event.
Thanks