I've been reading about many methods that could potentially do this but nothing seems definitive or completely applicative to my situation.
What I want to do is read in an excel file from my desktop (within MS Access VBA) and then while reading it in I want to run a series of data validations against it. Such as check if the cell at B16 is a certain value or if it is a certain string. I need to be able to loop through rows while checking values and summing values. Think of an excel file with a lot of accounting terms and numbers. How would I go about validating that data?
I am currently able to read in excel files and add them to access db tables using:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12Xml, "MyTbl", _
Me.txtFileName, True, "Sheet1!"
I've also read about using recordsets, using ActiveX Data Objects, and using DoCmd.TransferDatabase acLink.