I have an Access database with a form to select a "log file" to be imported. The log files are always named in the format TmRsLogDATE.csv where DATE is the date of the log file e.g. TmRsLog2003-02-28.csv. Is it possible to work out from the filename if the log file to be imported is an end of month file? I am able to strip out and format the date from the filename with no problem using the follwing code:
strSearch = "TmRsLog"
strLogDate = Mid(Me.txtFilePath, InStr(Me.txtFilePath, strSearch) + 7, 10)
strLogDate = FormatDateTime(strLogDate, vbShortDate)
So in the above example I would end up with the date 28/02/03. However, I don't know how I can then check to see if the date is the end of that month? PLEASE NOTE, the log file being imported may not be within the current month, so when checking to see if the date of the log file is the end of the month it cannot be checked against the current month - it has to be checked against the month in the log filename!!
Any help would be appreciated.
strSearch = "TmRsLog"
strLogDate = Mid(Me.txtFilePath, InStr(Me.txtFilePath, strSearch) + 7, 10)
strLogDate = FormatDateTime(strLogDate, vbShortDate)
So in the above example I would end up with the date 28/02/03. However, I don't know how I can then check to see if the date is the end of that month? PLEASE NOTE, the log file being imported may not be within the current month, so when checking to see if the date of the log file is the end of the month it cannot be checked against the current month - it has to be checked against the month in the log filename!!
Any help would be appreciated.