Create mdb from report tool - error

Keith McElroy
Keith McElroy used Ask the Experts™
Scenario:  Using a Proprietary Report Tool that uses vb script as its internal macro language
Attempting to create an mdb file
Computer:  64 Bit Win 7
Issue:  Error appears at point script creates mdb file
Works on 32 bit machines

Screenshot of err:
Screenshot of code:
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014

What error are you getting?


The Microsoft Access database engine cannot open
or write to the file ‘C:\Users\myname\py_reporter04012016.mdb. It
is already opened exclusively by another user, or you need permission
to vew and write its data
Src: Microsoft Access Database Engine
Line 25 Error: 0 Scode 8004005


The Report Designer tool is accessed via Citrix.
MIS Liason
Most Valuable Expert 2012
Did this Proprietary Report Tool ever work?
Is this an off-the shelf system, ...or was it developed in-house?
Is this an issue for all users?
In any event, ...try contacting the makers of this tool for help...

Not sure what the ultimate issue is,...but most reporting tools do not make the leap and actually have the need to "Create" MDB files.
What typically happens is that these tools will link to the Access "Data" (tables), then make there own reports from that data.

In any event, ...a lot of times your error means that the "creator" (your proprietary tool?), ...may not have the appropriate permissions on the drive (or user's folder) to create files.
(or the Path is invalid)
So check these things also...

FWIW, ...code like this (in Access VBA) works fine to Create new Access database:

Dim wrkspc      As Workspace
Dim dbs         As Database
Dim strFileName As String

   Set wrkspc = DBEngine.Workspaces(0)

   strFileName = "c:\YourFolder\NewAccessMDB.mdb"

   Set dbs = wrkspc.CreateDatabase(strFileName, dbLangGeneral)

Open in new window

Most Valuable Expert 2012
Top Expert 2014

Looks like the code is trying to create a table in the database. If so, then as Jeff indicates, this may be a permissions issue. Your user will need to have Read Write Create Destroy permissions on the folder hosting the database file.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial