Solved

read access without locking dbase

Posted on 2014-12-10
4
98 Views
Last Modified: 2015-01-07
i havw excel a vba macro that reads records in an access database table on a network drive.  I only have read only access to the network, however if my excel vba macro is reading the access table, and the owner of that access table is trying to read or write to his tables, he is locked out because i'm accessing it. So, even though i only have read only access to his tables, i still lock him out.  is there a way i around this so that i can read his tables at anytime without locking him out?  i tried reading the records from an access query instead of directly from his tables, but this did not help.

im looking for a vba solution.  thanks.
0
Comment
Question by:jtencha
4 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40493526
You could start by posting the code you are using... ;)
0
 
LVL 16

Accepted Solution

by:
Jerry Paladino earned 500 total points
ID: 40493562
Couple of suggestions depending on how you are attached to the Access db.

If you are using a QueryTable (Data / Get External Data / From Access...) then open the Connection Properties dialog and change the Mode value in the connection string from "Share Deny Write" to "Read".   That may solve the situation.   See screen capture below.

If you are making the connection to Access with ADO inside VBA then again change the Mode setting.   Before you make the connection add...   cn.Mode = adModeRead         (cn being whatever your connection variable is)

Microsoft reference to this property...

Mode Property (ADO)
http://msdn.microsoft.com/en-us/library/windows/desktop/ms676693%28v=vs.85%29.aspx 

ConnectModeEnum
http://msdn.microsoft.com/en-us/library/windows/desktop/ms675792(v=vs.85).aspx
Connection Properties Dialog
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 40535235
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
My experience with Windows 10 over a one year period and suggestions for smooth operation
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now