Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 17th, 2005, 10:20 AM
Registered User
 
Join Date: Aug 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default db connection

I have an application in Excel that queries an Access database. Some users have read-only access to the folder that the application is saved in. These users are not able to run the application as it errors out when referencing the database to open it to query. I do not want to grant all users READ/WRITE access. Is there another way around this? The application errors out at the last line of code that is pasted below.
Thank you!

    Dim wrkJet As Workspace
    Dim dbsFinance As Object
    'Dim conPubs As Connection
    Dim rstTemp As Object
    Dim strSQL As String
    Dim SearchOption As Integer


    UserForm1.optContains_Click


  'Open Microsoft Jet and ODBCDirect workspaces, Microsoft
    ' Jet database, and ODBCDirect connection.
    Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet)

    'Enter the location of the database below
    Set dbsFinance = wrkJet.OpenDatabase("C:\Feuerborn\Account-Level Rptg Tool\Acct-Lvl Rptg Tool.mdb")


 
Old August 17th, 2005, 10:33 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

This is really a network rights issue and not an Access issue.
Perhaps if you are on a Microsoft network you could put the file in a folder where everyone has read/write access on the folder, then run the security wizard and create read/write, and read only groups, and then pass the proper credentials for each user using Windows authentication. See A! Press "Real World Microsoft Access Database Protection and Security", ISBN: 1-59059-126-7
If you are on a Novell network, you are scr*w*d cause it can't authenticate to Access.


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
db connection string Alexi ASP.NET 2.0 Basics 1 October 5th, 2006 05:25 AM
db connection dfeuerborn VB Databases Basics 1 August 19th, 2005 02:08 PM
db connection dfeuerborn Excel VBA 1 August 19th, 2005 02:24 AM
DB Connection stu9820 ASP.NET 1.0 and 1.1 Basics 1 September 26th, 2004 09:01 PM
Preferred db connection mega Classic ASP Professional 3 July 2nd, 2004 08:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.