Hello,
I'm using the below code to import data into a table daily.
I would like a way for me to log the date and time of each import. Is this possible?
Ideally I'd like a table to have the list of each import (they had different names), and the date and time.
In the code below 'File_import' would have/be the name of the file I'm uploading....
I'm using the below code to import data into a table daily.
I would like a way for me to log the date and time of each import. Is this possible?
Ideally I'd like a table to have the list of each import (they had different names), and the date and time.
In the code below 'File_import' would have/be the name of the file I'm uploading....
Code:
Private Sub Input_Pending_Report_BUTTON_Click()
Dim objXLApp As Object
Dim File_import As Variant
Set objXLApp = CreateObject("excel.application")
' Ask the user for the file name to open.
File_import = objXLApp.GetOpenFilename
If File_import = False Then
MsgBox "No file selected. Import cancelled"
Exit Sub
Else
DoCmd.TransferSpreadsheet acImport, , "dlyERR_Cumulative", File_import, True
MsgBox "Import completed"
End If
End Sub