We are running access 2016 and getting a runtime error of 3024 when running the following code. This error has never occurred and we run this process every month and have done so for years. It appears to me that it is not creating the mdb file. I have validated that the code is returning to correct variables for sfilename, and sfilepath. Where would I check for access errors on the server. when I place a file in the directory and rename it to the mdb file that the copy section is looking for I get the same error. How would I check for permission issues in creating the mdb file? Thanks in advance for any input. I am a DBA not a developer. Regards,
'************************************************* ************************************************** '
' STEP 3 - Create new archive database '
'************************************************* ************************************************** '
'#3 of 13
' Show progress bar meter
ProgMeter2 (0)
Dim sCopyShell As String
' Create a string with no / on date
sFridayFileDate = txtLastMonthDayDate.Value
' Create the filename
sFileName = "ME" & sFridayFileDate & ".mdb"
'Path and filename for new mdb file
sFilePathName = "\\cfbf-sql\MBDB\Archives\MONTHTLY_PROD" & txtFolderYear.Value & "" & sFileName
' sFilePathName = "\\test-sql\MBDB\Archives\MONTHTLY_PROD" & txtFolderYear.Value & "" & sFileName
' Get full copy path
sCopyShell = "cmd /c copy \\cfbf-sql\ITDB\METEMPL.mdb \\cfbf-sql\MBDB\Archives\MONTHTLY_PROD" & txtFolderYear.Value & "" & sFileName & ""
' sCopyShell = "cmd /c copy \\test-sql\ITDB\METEMPL.mdb \\test-sql\MBDB\Archives\MONTHTLY_PROD" & txtFolderYear.Value & "" & sFileName & "
' Copy Weekly Archive Template to \\member2\MBDB\Archives\MONTHTLY_PROD\
Shell sCopyShell
' wait till file is copied
Sleep 5000