Dim aSQL As String
Dim strFolder As String
Dim strFile As String
Dim strTable As String
DoCmd.OpenQuery "qryDeleteImported"
Select Case Mid(Me.txtFilename, InStrRev(Me.txtFilename, "."))
Case ".xls"
' MsgBox "Excel File"
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "myImport", Me.txtFullpath, True
Case ".doc"
MsgBox "Word File"
Case ".pdf"
MsgBox "Adobe File"
Case ".txt"
MsgBox "Text File"
Case ".csv"
MsgBox "CSV File"
End Select
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryAppendImported"
Beep
MsgBox "Your data has been imported successfully" & vbCrLf & "", vbInformation, "Data import complete"
DoCmd.Close
|