Solved

read access without locking dbase

Posted on 2014-12-10
4
108 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 47

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
My experience with Windows 10 over a one year period and suggestions for smooth operation
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

733 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