Moving Folders

G

Guest

I have some code attached to a button on a form to create a folder relating
to a specific record on the file server. It also puts a hyperlink into a
field for easy access to the folder.

myFolder = Me![txtJobNo] & "_" & Me![txtName]
myPath = "\\server\db_JobFiles"

MkDir myPath & "\" & myFolder
myHyper1 = HyperlinkPart(myFolder, acDisplayText)
myHyper2 = HyperlinkPart(myPath & "\" & myFolder, acDisplayText)
Me.wpPath = myHyper1 & "#" & myHyper2

This code works fine however after the record is finished with I need to
archive the folder to a different location and change the location of the
hyperlink. My first question is what is the code to move the folder to a
different location.

Thanks in advance

Matt
 
F

fredg

I have some code attached to a button on a form to create a folder relating
to a specific record on the file server. It also puts a hyperlink into a
field for easy access to the folder.

myFolder = Me![txtJobNo] & "_" & Me![txtName]
myPath = "\\server\db_JobFiles"

MkDir myPath & "\" & myFolder
myHyper1 = HyperlinkPart(myFolder, acDisplayText)
myHyper2 = HyperlinkPart(myPath & "\" & myFolder, acDisplayText)
Me.wpPath = myHyper1 & "#" & myHyper2

This code works fine however after the record is finished with I need to
archive the folder to a different location and change the location of the
hyperlink. My first question is what is the code to move the folder to a
different location.

Thanks in advance

Matt


Sub RenameDb()
' Rename and/or move a database
Dim OldName As String
Dim NewName As String
OldName = "C:\CurrentPath\DatabaseName.mdb"
NewName = "C:\NewPath\DatabaseName.mdb"
Name OldName As NewName

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top