Macro function to convert excel to access and replaces old data with new one

ewong

New member
Local time
Yesterday, 22:52
Joined
Aug 27, 2012
Messages
6
i need help in creating a macro that would automatically convert an excel spreadsheet into an access database..

each month, i basically receive a spreadsheet that has around 15 columns in it. the columns are the same each month: employee id, employee name, account id, account name, commission id, total commission amount (capitalized), commission period date, commission per month (starting from current month till december of 2012). Columns will always be the same. Most of the numbers would also mostly be the same with occasional changes to some of them.

example, if the current month is june, then commission per month column would start from june-dec 2012. if it's aug, then it will start from aug-dec 2012.

what i want is to create a macro that would let me automatically convert this excel spreadsheet into an access database each month.

the macro would also need to erase the previous month's data and replaces/repopulates it with data from the current month.

example: suppose I already June data in the access database, then July comes along. I would need to erase all of the data from June and repopulate/replace it with latest/most updated data from July.

In summary, i need a macro that automatically converts excel spreadsheet to access database and erases all of the data from previous month and repopulate it with the latest/most updated data from current month

Thanks for your help!
 
Hi ewong. I have a few questions here in terms of the data creation.

You said that you receive a spreadsheet every month. How is this created, and by whom?

I would think it would make sense if you could have the person creating this spreadsheet to key the data directly into 'your' database. You would set up a simple input form for them.

Is that a possibility?
 
Alternatively, if your spreadsheet is set up in a normalized manner, you could link it to your database.
 

Users who are viewing this thread

Back
Top Bottom