Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » General

Post new topic   Reply to topic
change file location
View previous topic :: View next topic  
Author Message
zali
Newbie


Joined: 27 Feb 2006
Posts: 3

PostPosted: Mar 6th, 2006 09:06 PM    Post subject: change file location Reply with quote

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
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » General All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic