I am creating an Access database and some help with VBA would be much appreciated.
Help is what I need to do,
I have an Excel worksheet containing data that needs to be added to the existing table in Access. Is there a way in VBA to add the data in excel row by row?
For every row in Excel I need to:
1st: check if the sample_number already exist in Access table, then do some action if it exist.
2nd: if the sample_number doesn't already exist then copy and paste this row from excel to Access table.
Right now I am stuck on how to process the excel spreadsheet row by row rather than importing the whole sheet at once.
Helps are much appreciated! Thanks
transferspreadsheet
to a new table, then use SQL to derive the subsets of data you require by using aninner join
and aleft join
Use SQL here, and built in functions, would be my advice. Even skipping the import and using the Excel file in the SQL. – Nathan_Sav