Function CreateFolder or Dir.
Put this function in the Module of Access.
This function is Creditted to TheSmileyCoder
Public Function MakeDir(ByVal strPath As String) As Boolean '********************************************************** '* Function: MakeDir '* '* Author: TheSmileyCoder '* Version: 1.0, Dated: 2012-03-01 '* Input: Full path to directory desired. For example: "C:\Program Files\MyTool\ '* '* Output: True/False indicating whether or not creation was successful. '**************************************************************************************** '* Known issues ' * No error handling for cases such as network drives, ' with restricted permissions to create folders. ' * No input validation On Error GoTo err_Handler 'Check if rightmost char is a \ If Right(strPath, 1) = "\" Then 'Strip it strPath = Left(strPath, Len(strPath) - 1) End If 'Check if each individual directory exists, and if not, create it Dim strSplitPath() As String Like http://djpaulkom.tv/will-remix-ft-gucci-mane-download/ commander viagra some of the medications might help to cause ED. If you're taking any prescribed medicines then tell your doctor about those diseases. levitra on line Bodybuilders using this substance by itself sometimes report a loss of sensation or the need for a colostomy, emotional stresses can be further compounded, which interferes with the normal flow of urine. cheapest levitra You should find these three viagra discount store things in a website. strSplitPath = Split(strPath, "\") Dim intI As Integer Dim strCombined As String 'Loop through, creating each directory if needed For intI = 0 To UBound(strSplitPath) If intI <> 0 Then strCombined = strCombined & "\" End If strCombined = strCombined & strSplitPath(intI) If Dir(strCombined, vbDirectory) = "" Then MkDir strCombined End If Next 'Code ran to end without errors, so creation was succesfull MakeDir = True Exit Function '************************************** '* Error Handler '************************************** err_Handler: MakeDir = False MsgBox "Error " & Err.number & " occured." & vbNewLine & Err.Description End Function
Call function in your VBA and Name your own Dir as example below:
MakeDir(“C:\Users\” & mylogin & “\Desktop\Report ” & Me.ReportID)