OK, that is good...
Try changing the code to (changes in BLUE)
Code:
Private Sub cmdImport_Click()
Dim filepath As String
filepath = "C:\Users\user\Desktop\FabricPO.xlsx"
If FileExist(filepath) Then
DoCmd.TransferSpreadsheet acImport, , "TempFromExcel", filepath, True
If IsNull(DLookup("[Date]", "NewFabricPO")) Then
MsgBox "No new data to add"
Else
' DoCmd.OpenQuery "qryappend", acViewNormal
CurrentDb.Execute "qryappend", dbFailOnError
End If
Else
MsgBox "File not found. Please check filename or file location."
End If
Dim SQLDelete As String
SQLDelete = "DELETE * FROM TempFromExcel"
' DoCmd.RunSQL SQLDelete
CurrentDb.Execute SQLDelete, dbFailOnError
End Sub
If no errors, then try changing "qryappend" to
Code:
INSERT INTO FabricPO ([Date], PO, [Style NO], [GL Lot], Fabrication, [Fabric Cuttable Width], Color, [Our Qty], [Supplier Qty], Approve )
SELECT FabricPOQuery.Date, FabricPOQuery.PO, FabricPOQuery.[Style NO], FabricPOQuery.[GL Lot], FabricPOQuery.Fabrication, FabricPOQuery.[Fabric Cuttable Width], FabricPOQuery.Color, FabricPOQuery.[Our Qty], FabricPOQuery.[Supplier Qty], FabricPOQuery.Approve
FROM FabricPOQuery INNER JOIN FabricPO ON FabricPOQuery.ID = FabricPO.ID;
The "ID" field has been removed from the INSERT and the SELECT parts.
Again, the field name "DATE" should be changed and the spaces in all object name should be removed.