I need the created folder and report to be propercase, its just a cosmetic fad of mine !!:
Code: Select all
Private Sub cmdUploadFTP_Click()
If strRole <> "SuperUser" Then
MsgBox "Only Super Users Have Access This Function", , "Restricted"
Exit Sub
End If
If Len(Dir("L:\SW-Tables\Reports\" & Me.BrowserTitle, vbDirectory)) = 0 Then
MkDir "L:\SW-Tables\Reports\" & Me.BrowserTitle
End If
If FileExists("C:\accdata.html") Then
FileCopy "C:\accdata.html", "L:\SW-Tables\Reports\" & Me.BrowserTitle & "\" & Me.BrowserTitle & "-" & Format(Me.txtStartDate, "dd-mmm-yyyy") & " To " & Format(Me.txtEndDate, "dd-mmm-yyyy") & ".html"
MsgBox "Report Uploaded", , "Success"
Else
MsgBox "No Report to Upload", , "Error"
Exit Sub
End If
End Sub