Changing the location of a file through

S

stevehorton

Hi there,

I want to be able to move a file through the use of a command button i
vb.

The idea would be that after a file was approved it would be moved t
the approved folder

The form would have a text box with the file location in, below thi
,there would be two command buttons, one approve and one reject.

Therefore the file which is waiting to be accepted has the locatio
C:\sch and when a comand button (approve) is pressed it moves t
C:\sch1, if though it is rejected then it goes to c:\sch2

Is this possible?
 
B

Bob Phillips

Steve,

Const sFolder As String = "C:\sch"
Const sFolder1 As String = "C:\sch1"
Const sFolder2 As String = "C:\sch2"

Sub CommandApprove()
Name sFolder & "\" & sfile As sFolder1 & "\" & sfile
End Sub
Sub CommandReject()
Name sFolder & "\" & sfile As sFolder2 & "\" & sfile
End Sub

You will need to work out how to poulate the file name sFile.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top