S
sbradley0
Basically, I'm trying to do what it says in the subject. I have a
table (tblReportsMe) with three fields:
woindex (unique)
wofile (current path to a specific file, eg. c:\00916678423 ... file
has no extention)
worepname (desired name of the file)
I'm trying to copy the files and rename them from a form, using a the
following sub:
Private Sub btnRenameFiles_Click()
Dim rstAny As DAO.Recordset
Dim dbAny As DAO.Database
Dim strFrom As String
Dim strTo As String
Set dbAny = CurrentDb()
Set rstAny = dbAny.OpenRecordset("SELECT DISTINCT woindex, worepname,
wofile FROM tblReportsMe")
While Not rstAny.EOF
strFrom = wofile
strTo = "C:\Documents and Settings\All Users\Documents\CFx\Month End
Reports\" & worepname & ".txt"
FileCopy strFrom, strTo
table (tblReportsMe) with three fields:
woindex (unique)
wofile (current path to a specific file, eg. c:\00916678423 ... file
has no extention)
worepname (desired name of the file)
I'm trying to copy the files and rename them from a form, using a the
following sub:
Private Sub btnRenameFiles_Click()
Dim rstAny As DAO.Recordset
Dim dbAny As DAO.Database
Dim strFrom As String
Dim strTo As String
Set dbAny = CurrentDb()
Set rstAny = dbAny.OpenRecordset("SELECT DISTINCT woindex, worepname,
wofile FROM tblReportsMe")
While Not rstAny.EOF
strFrom = wofile
strTo = "C:\Documents and Settings\All Users\Documents\CFx\Month End
Reports\" & worepname & ".txt"
FileCopy strFrom, strTo