Create mdb from report tool - error

Keith McElroy
Keith McElroy used Ask the Experts™
on
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:
http://www.screencast.com/t/DeI3s8nSapWe
Screenshot of code:
http://www.screencast.com/t/LccpejavV
Comment
Watch Question

Do more with

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

Commented:
What error are you getting?

Author

Commented:
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

Author

Commented:
The Report Designer tool is accessed via Citrix.
MIS Liason
Most Valuable Expert 2012
Commented:
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



JeffCoachman
Most Valuable Expert 2012
Top Expert 2014

Commented:
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