zali Newbie
Joined: 27 Feb 2006 Posts: 3
|
Posted: Mar 6th, 2006 09:06 PM Post subject: change file location |
|
|
I realise that just by changing the pathname it does not mean that the file is moved to that location.....I want to move the file to the location and change the pathname so that it points to the new location.....Then when I click attach, the user will select a file from a open dialog and the file will be automatically stored in a new location..eg F:\New\.........So when "open" is clicked, the file will open from that location....
Can ya help me?
this is the attachment part of my code
Private Sub cmdAttachment_Click()
Dim mystring As String
Dim strFilePath As String
Dim sFileName As String
Dim strCommonPath As String
On Error GoTo DialogError
With CommonDialog1
.CancelError = True
.Filter = "Text Files (*.txt)/*.txt/Doc Files (*.doc)/*.doc/All Files(*.*)/*.*"
.FilterIndex = 1
.DialogTitle = "Select a file to attach"
.ShowOpen
MsgBox "You have selected " & .FileName
strFilePath = Trim$(CommonDialog1.FileName)
strCommonPath = "F:\New\"
mystring = strCommonPath & Dir(strFilePath, vbNormal)
MsgBox mystring
'''' mystring = Trim$(CommonDialog1.FileName)
''''
txtAttach.Text = mystring
m_recRMA!Attachment = mystring
m_recRMA.Update
End With
DialogError:
End Sub _________________ The unfortunate, led by the unreliable, asked to to undesirable for the ungrateful |
|