Results 1 to 2 of 2
  1. #1
    Aaron5714 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    48

    Test Connection to Backend Database

    I have a split database with the backend residing on a shared network drive. In my startup script I want to test if the user can access the filepath to the backend database before loading the main form. In most cases if a user cannot access the backend it would be because they are not connected to the network or have not been granted access to the directory where the backend resides.

    Can anyone provide an example of VBA code to check for access to the backend, or point me to a link that might help?



    Thanks in advance,
    Aaron

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Google: Access vba test connection

    Basically, run a query against a table and use error handling. A domain aggregate function will generate the same error as trying to open a query if table can't be found.

    DCount("*","tablename")
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Database for test progress tracking
    By Ricardo in forum Database Design
    Replies: 3
    Last Post: 06-07-2012, 07:20 AM
  2. Checklist to test new database
    By wouterv81 in forum Access
    Replies: 1
    Last Post: 04-26-2012, 09:17 PM
  3. Replies: 20
    Last Post: 08-08-2011, 01:34 PM
  4. Test for valid ODBC connection
    By jgelpi16 in forum Programming
    Replies: 1
    Last Post: 06-10-2011, 01:39 PM
  5. Keying in Test answers to Access DB from Written Test
    By CityOfKalamazoo in forum Access
    Replies: 3
    Last Post: 03-01-2010, 08:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums