troubleshooting Question

Access Opens with Ready-Only Access when opened via VBA

Avatar of Shanan212
Shanan212Flag for Canada asked on
Microsoft Access
3 Comments1 Solution369 ViewsLast Modified:
   DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, _
    "TEMP", "C:\Users\userA\Desktop\" & iName, True

Hi,

I have the above code in a VBA module inside Access.

I also have read/write access to the database (and its folder) that was opened prior to this code via the following code

    Dim Ac As Object
    
    Set Ac = CreateObject("Access.Application")

    Ac.Visible = False
    
    Ac.OpenCurrentDatabase ("\\Fileserver\Everyone\Engineering Database\Database\NM Probill Database\NM Probill Database.accdb")

My problem is, 1/10 times, the database is opened as 'Read-Only' while no-one else is accessing it. This is creating problems for the appending query above.

How do I resolve this? How do I make it force open as 'read-write'?

Thanks for your time!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros