Code:
Dim FileName
If FileExists("C:\Documents and Settings\Rkolofer\My Documents\Commission\Yum_Brands_" + Month(Date - 30) + "_" + Year(Date - 30) + ".xlsx") Then
FileName = "Yum_Brands_" + Month(Date - 30) + "_" + Year(Date - 30) + ".xlsx"
DoCmd.TransferSpreadsheet acImport, , "Commission", "C:\Documents and Settings\rkolofer\My Documents\Commission\" + FileName, True
ElseIf FileExists("C:\Documents and Settings\Rkolofer\My Documents\Commission\Yum_Brands_" + Month(Date - 60) + "_" & Year(Date - 60) + ".xlsx") Then
FileName = "Yum_Brands_" + Month(Date - 60) + "_" & Year(Date - 60) + ".xlsx"
DoCmd.TransferSpreadsheet acImport, , "Commission", "C:\Documents and Settings\rkolofer\My Documents\Commission\" + FileName, True
ElseIf FileExists("C:\Documents and Settings\Rkolofer\My Documents\Commission\Yum_Brands_" + Month(Date - 90) + "_" + Year(Date - 90) + ".xlsx") Then
FileName = "Yum_Brands_" + Month(Date - 90) + "_" + Year(Date - 90) + ".xlsx"
DoCmd.TransferSpreadsheet acImport, , "Commission", "C:\Documents and Settings\rkolofer\My Documents\Commission\" + FileName, True
Else
DoCmd.Close
End If
Change as highlighted and see what happens?