i am novice to access and trying to copy file from source folder to destination folder using following code in access but its not working
Private Sub Command9_Click()
Dim strSource As String
Dim strDest As String
Dim sPath As String
strSource = Forms!frmScanUpload.txtfilename '- Path/Name of the file to be copied
Me.DocName = DocNameGenerat.Value
strDest = CurrentProject.Path & "\ScanDocument\" & Format(Me.DocName) & ".pdf" '- Path/Name for copying to file to
Call FileCopy(strSource, strDest)
MsgBox "File Transferred"
Me.DocName = "#" & strDest & "#"
End Sub
request to do correct the code