VBA - Need Help To Store And Append the Data From Excel To Access

Status
Not open for further replies.

ranjith2523

Board Regular
Joined
Apr 29, 2014
Messages
90
Office Version
  1. 365
Hi Friends,

I am using Microsoft Office 365.

I need your help to store and append the data from Excel to Access using Excel VBA. I have created an Excel File and Access file with the same headers and my requirement is that the data be moved to excel to access when I click a button. Once it is been pushed, If I add new data in excel and click the button then the data to be appended in Access. Simply I need to store the data in MS Access and I would like to use VBA code to do that.

I am not familiar with VBA Coding to work with the Access database but still, I spent a day to google and tried something like beginning with the below coding but I was not able to achieve it.

Dim dbCon As New ADODB.Connection
Dim dbCommand As New ADODB.Command

dbCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sdbpath & "; Jet OLEDB:Database Password=;"


Excel Sheet Name "Data"
1637933842999.png


Created Table In MS Access (File name - Access.accdb)

1637933890219.png


Can someone please help me with this?

Regards,
Ranjith
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Status
Not open for further replies.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,492
Messages
5,832,010
Members
430,103
Latest member
BIGGAZ

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
Top