Question : Import Monthly data from vendor with items sales qty that changes

Experts,

          I am currently working on a database that tracks our monthly purchases from our vendor. The purpose of this database will provide things like rebate tracking and monthly billing. We currently receive a csv formated report monthly from our vendor this file has all items and sales listed from the 1st of the month through the last day of the month. I would like to take this file and auto import to my access database. Im not sure how to go about setting the structure of the import up. Since I want to keep the existing months data so i can look back at previouse month/quater sales. Should this be done outside access via a VB script? I am not new to access however most of my databases have data manually entered Im stumpped any help would be appreciated.

Thanks,

Answer : Import Monthly data from vendor with items sales qty that changes

Actually, though there is a common principle, that solution was geared for Excel rather than Access.

For Access, to do the same sort of thing manually or in VBA:
  1. Import your CSV to a staging table that has all the CSV columns plus a month identifier column. This could be date type e.g. "31/12/2009" or text "2009-12" as you prefer. 
  2. Use a parameterised update query where the user enters the month date or string to update the staging table 'Month' column. 
  3. Use an append query to add the imported data, complete with month identifier into your main data table 
  4. Use a delete query to empty the staging table ready for next use.
     
Random Solutions  
 
programming4us programming4us