Got it working like a charm! Thanks so much for the insight. Here's the final code:
Private Sub UploadToIpad_Click()
On Error GoTo Form_Error
If IsNull(Me.TimekeeperName) = True Then
MsgBox "Select an available timekeeper to begin the upload.", 0, "CW Case Management System"
Else
DoCmd.OpenForm "UploadProgressForm"
DoEvents
Dim MyDB As Database
Dim MyRS As Recordset
Dim fs As Object
Dim objNetwork
Dim strDriveLetter, strRemotePath, sortpath, filename
strDriveLetter = "I:"
strRemotePath = "\\" & Me.RemoteUploadPath1
Set objNetwork = CreateObject("WScript.Network")
Set fs = CreateObject("Scripting.FileSystemObject")
If (fs.DriveExists("I:")) = True Then
Else
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath
End If
Set MyDB = CurrentDb
Set MyRS = MyDB.OpenRecordset("CheckForMarkedQuery")
MyRS.MoveFirst
Do Until MyRS.EOF
filename = MyRS![FilePath]
sortpath = MyRS![MatterName] & "\" & MyRS![SortCategory]
filename = Replace(filename, "file:", "")
MkDirs (strDriveLetter & sortpath)
fs.CopyFile filename, strDriveLetter & "\" & sortpath & "\"
MyRS.MoveNext
Loop
End If
MsgBox "The Selected Files Have Been Successfully Uploaded.", 0, "CW Case Management System"
Form_Error:
Select Case Err.Number
Case -2147024843
MsgBox "The remote device could not be located on the network. Check the IP address and make sure that the Document Manager is open and running on the remote device.", 0, "CW Case Management System"
End Select
End Sub