First off - this is my first posting here so i want to thank everyone in advance for help now and in the furture. I'm not much of a progamer, bur rather a network admin working on a project for my boss. Anyways...
in Access i have a command button that prompts the user to select a PDF or TIF file on their computer. I need to be able to copy that selected file to our server. i cant figure out ho how to do this however. so far this is the code that i have.
Private Sub BtnAttachFile_Click()
Dim strPath As String, FileLoc As String, , Frm As Form, FileName As String
Dim strExt As String, strExtDesc As String, intCurrentRow As Integer
Set Frm = Forms!PartNumbers
strExt = "tif;tiff;pdf"
strExtDesc = "Tif images and pdf files (*.pdf, *.tif)"
strPath = GetFile("Link", strExtDesc, strExt)
If IsBlank(strPath) Then
GoTo cmdLink_Click_Exit
Else
MsgBox ("File is: " & strPath)
FileLoc = strPath
FileName = strPath
End If
Now - the FileLoc is the full directory - ex "c:\docs and settings\username\desktop\file.pdf" i dont know how to just find the name of the "file.pdf"
Thanks for the help!
in Access i have a command button that prompts the user to select a PDF or TIF file on their computer. I need to be able to copy that selected file to our server. i cant figure out ho how to do this however. so far this is the code that i have.
Private Sub BtnAttachFile_Click()
Dim strPath As String, FileLoc As String, , Frm As Form, FileName As String
Dim strExt As String, strExtDesc As String, intCurrentRow As Integer
Set Frm = Forms!PartNumbers
strExt = "tif;tiff;pdf"
strExtDesc = "Tif images and pdf files (*.pdf, *.tif)"
strPath = GetFile("Link", strExtDesc, strExt)
If IsBlank(strPath) Then
GoTo cmdLink_Click_Exit
Else
MsgBox ("File is: " & strPath)
FileLoc = strPath
FileName = strPath
End If
Now - the FileLoc is the full directory - ex "c:\docs and settings\username\desktop\file.pdf" i dont know how to just find the name of the "file.pdf"
Thanks for the help!