Hi all,
First time posting here so please be nice
I been tasked to make a database all is going well expect for this VBA code i need to create.
It needs to do the following:
1. Create a Folder if not made already - Done
2. Read Access Field (Scriptname) & move that file to another directory with Todays Date
3.Then copy data from another field (script) then create a txt file based on that data with the filename of Scriptname from step 2.
so far i have done step 1. but im having trouble with step 2.
i would appreciate any help
here is my code
First time posting here so please be nice

I been tasked to make a database all is going well expect for this VBA code i need to create.
It needs to do the following:
1. Create a Folder if not made already - Done
2. Read Access Field (Scriptname) & move that file to another directory with Todays Date
3.Then copy data from another field (script) then create a txt file based on that data with the filename of Scriptname from step 2.
so far i have done step 1. but im having trouble with step 2.
i would appreciate any help

here is my code
PHP:
'Step1
If Len(Dir("c:\Archive\", vbDirectory)) = 0 Then
MkDir "c:\Archive\"
End If
'step 2
Dim Scripts As String
ScriptName.SetFocus
Scripts = ScriptName.Value
If Len(Dir("C:\Archive\& Scripts", vbDirectory)) = 1 Then
Name "C:\Archive\" & Scripts As "C:\test\" & Scripts
Else
MsgBox "Wrong"
End If