Changing Directory Name

G

Guest

Hi! Novice VBA Programmer here.... I've got a directory set up for
attachments to a "Request for Quote" (RFQ). Once the RFQ gets assigned to a
quote, I want to change the directory name from the RFQ No. to the Quote No.
Here's the code I'm using ... but nothing's happening! Any suggestions?

Dim oldName As String
Dim newName As String

newName = "\\prpsrv1\users\Estimating Dept\Estimating DB\" &
Me.PRP_Quote_No
oldName = "\\prpsrv1\users\Estimating Dept\Estimating DB\RFQ_" & Me.RFQ_ID

If Me.PRP_Quote_No <> " " Then
If Dir(oldName, vbDirectory) <> "" Then
Name oldName As newName
End If
End If

Thanks!

Cindy
 

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

Top