Hello,
This may be a bit confusing but…
We have a database (CardFile) that tracks plan files. There is a command button on a search form that after running a select query, opens the corresponding file. In most instances this works fine, except when attempting to open PDF’s on one machine. They open in about 5 seconds on all machines except on the newest (and most powerful) machine where it takes almost a minute. The files reside on our server. As a test, I moved all files to the local machine; recoded the command button; and tested. The PDF file opened < 2 seconds. So, for some reason, this machine can’t search the server as fast/well as all others. I spoke to our IT guys but no luck.
Here’s part of the code that appears to be cumbersome:
strPathAndFile = fReturnFilePath(Me.PlanNo1 & ".pdf", \\10.10.30.40\city_engr\cad_files\plans\")
If strPathAndFile <> "" Then
objshell.ShellExecute strPathAndFile, 4, 2
GoTo GoodBye
End If
10.10.30.40 is the IP of our server (aka city_server). We map \\10.10.30.40\city_engr\cad_files\ as drive Z:. So I tried (but did not work):
strPathAndFile = fReturnFilePath(Me.PlanNo1 & ".pdf", z:\plans\")
If strPathAndFile <> "" Then
objshell.ShellExecute strPathAndFile, 4, 2
GoTo GoodBye
End If
When I copied all files to the local drive I recoded as follows (it worked perfect):
strPathAndFile = fReturnFilePath(Me.PlanNo1 & ".pdf", c:\plans\")
If strPathAndFile <> "" Then
objshell.ShellExecute strPathAndFile, 4, 2
GoTo GoodBye
End If
Any other suggestions would be greatly appreciated?
Thanks,
SKK
This may be a bit confusing but…
We have a database (CardFile) that tracks plan files. There is a command button on a search form that after running a select query, opens the corresponding file. In most instances this works fine, except when attempting to open PDF’s on one machine. They open in about 5 seconds on all machines except on the newest (and most powerful) machine where it takes almost a minute. The files reside on our server. As a test, I moved all files to the local machine; recoded the command button; and tested. The PDF file opened < 2 seconds. So, for some reason, this machine can’t search the server as fast/well as all others. I spoke to our IT guys but no luck.
Here’s part of the code that appears to be cumbersome:
strPathAndFile = fReturnFilePath(Me.PlanNo1 & ".pdf", \\10.10.30.40\city_engr\cad_files\plans\")
If strPathAndFile <> "" Then
objshell.ShellExecute strPathAndFile, 4, 2
GoTo GoodBye
End If
10.10.30.40 is the IP of our server (aka city_server). We map \\10.10.30.40\city_engr\cad_files\ as drive Z:. So I tried (but did not work):
strPathAndFile = fReturnFilePath(Me.PlanNo1 & ".pdf", z:\plans\")
If strPathAndFile <> "" Then
objshell.ShellExecute strPathAndFile, 4, 2
GoTo GoodBye
End If
When I copied all files to the local drive I recoded as follows (it worked perfect):
strPathAndFile = fReturnFilePath(Me.PlanNo1 & ".pdf", c:\plans\")
If strPathAndFile <> "" Then
objshell.ShellExecute strPathAndFile, 4, 2
GoTo GoodBye
End If
Any other suggestions would be greatly appreciated?
Thanks,
SKK