Access dataquery in Excel sheet locks Db while workbook is open

TomPC

Board Regular
Joined
Oct 13, 2011
Messages
95
Hello Fellow Exceleers!

Using XP/Access 2007/Excel 2007

I have a sheet with a data query that brings in an Access table. It is refreshed in a macro as follows:

Code:
Sub UpdateRefData()
    Sheets("RefData").Range("A1").ListObject.QueryTable.Refresh BackgroundQuery:=False
End Sub

The problem is - while one user has that sheet open - not actively refreshing - just open, the database locks. The database has other tables that people need to update in parallel.

Has anyone else experienced this? Is there additional code I ought to have used to close the connection or is this the way it rolls?

Thanks

Tom
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
I should add... by 'data query', I mean:

Data > [Get External Data] From Access > (Select Db.mdb) > (Select Table) > Import as Table into Existing Worksheet Cell A1.

Properties/Usage:
Enable background refresh TICKED
Refresh every x minutes NOT TICKED
Refresh data when opening the file NOT TICKED
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

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