# Edit same table form both Excel and Access



## lcorcoran

I have an Access Table and I would like to be able to edit the table form both Excel and Access. I add records to the table in access from another system so I can’t change that, I use power query in excel to import the data, I would like any changes made in excel to be updated back in to access automatically, I’m I asking the impossible.

Note: Also posted here in the Excel Questions forum: Edit same table form both Excel and Access


----------



## lcorcoran

Figured out a workaround for this problem

This VBA code will run a access macro

Sub AccessUpdate()
Dim A As Object
Application.DisplayAlerts = False
Set A = CreateObject("Access.Application")
A.Visible = False
A.OpenCurrentDatabase ("C:\Path\test.accdb")
A.DoCmd.RunMacro "RunUpdate"
Application.DisplayAlerts = True
End Sub

The Access Macro
 * Deletes a table
 * RunSavedImportExport to import the Table from Excel
 * And then calls an Update Query


----------

