append record from excel worksheet to access table and delete outdated record from access table

kennethqiu

New Member
Joined
May 17, 2014
Messages
1
Hi, I am new to excel vba programming. I got two questions.
1. I have a table (sale) in a database (db1) and an excel worksheet (NewSale) contains some record of what I need to append some records from excel to the access table (sale).
2. After appending the record, I need to delete the old (outdated) record (for example, 000729 where the end date is in April).

Here below is the access datatable and the excel worksheet
ItemNum Store_ID Sale_Start Sale_End Percent
721485 1001 4/28/2014 5/4/2014 11.51
168310 1001 4/28/2014 5/4/2014 11.76
714952 1001 4/28/2014 5/4/2014 3.87
321158 1001 4/28/2014 5/4/2014 4.09
285544 1001 3/19/2014 4/27/2014 3.69
000729 1001 3/17/2014 4/27/2014 3.98
983957 1001 3/17/2014 4/27/2014 3.81

I try to find the similar answers on the web with no luck. Thank you in advance for everyone who helps me out on this topic.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,215,219
Messages
6,123,685
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top