Hello guys, I would like to retrieve excel data from a folder from my desktop into my access.
My code:
Private Sub Command0_Click()
Dim filepath As String
filepath = "C:\Users\chelsia.koh\Desktop\Unused\Fabrication.xlsx"
DoCmd.TransferSpreadsheet acImport, , "ImportFromExcel", filepath, True
End Sub
My code is able to retrieve date from the folder into my table every time i click on "Import" button on my form, but it will not skip adding the existing data and add in the new data into the table as the data set will update every night. How can i only add the new data into the table that i import into access from the folder and skip additional on the existing data?
Thank you! Any helps offer are greatly appreciate! Good day ahead everyone
My code:
Private Sub Command0_Click()
Dim filepath As String
filepath = "C:\Users\chelsia.koh\Desktop\Unused\Fabrication.xlsx"
DoCmd.TransferSpreadsheet acImport, , "ImportFromExcel", filepath, True
End Sub
My code is able to retrieve date from the folder into my table every time i click on "Import" button on my form, but it will not skip adding the existing data and add in the new data into the table as the data set will update every night. How can i only add the new data into the table that i import into access from the folder and skip additional on the existing data?
Thank you! Any helps offer are greatly appreciate! Good day ahead everyone