I am using the following VBA to export data to an Excel Spreadsheet so that users can update the spreadsheet and send it back to me. Then I'd like to import it back into the table called tblProduct.
But I don't want to append the spreadsheet as it would create duplicates.
Instead, I would like to update only the relavent records based on a unique field that is in each record called "MSN".
Does anyone have sample VBA that does this?
Code:
Dim WbName As String
Dim WbSheet As String
WbSheet = "qryUpdate"
WbName = "ProductUpdate.xls"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, WbSheet, CurrentProject.Path & "\" & WbName, True
But I don't want to append the spreadsheet as it would create duplicates.
Instead, I would like to update only the relavent records based on a unique field that is in each record called "MSN".
Does anyone have sample VBA that does this?