Hi all, I faced this error when i import my excel file into access by using VBA Code. As you can see in the image i attached below, it shows that when i import excel file into access, some of my date are blank which is not the case in my excel file where all the date are fill up. How can i fix that?
Below is the VBA code i use for importing Excel file:
Below is the VBA code i use for importing Excel file:
Code:
Private Sub cmdImport_Click()
Dim filepath As String
Dim user As String
user = Environ("username")
filepath = "C:\Users\" & user & "\Desktop\FinalData.xlsx"
DoCmd.TransferSpreadsheet acImport, , "InvestmentData", filepath, True
End Sub