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
137
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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Status
Not open for further replies.

Forum statistics

Threads
1,214,998
Messages
6,122,643
Members
449,093
Latest member
Ahmad123098

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