Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Posts
    4

    Exclamation Unanswered: Different drive letters use by users when connecting to server!

    I have a Access 97 database which users use often, this db is kept on a server, but users connect to it with different drive letters every time they use the shortcut on their desktop.

    The problem is that, in this db, there is a Linked table to a admin tool which I use to close down the DB, if there is a DB lock out. This tool is another Access DB, on the same server, but different folder.

    In the user DB, the main form has a VB Sub (OnTimer), so every 30secs it looks to see if the DB should be closed down, by accessing this link table....however the Link table uses a drive letter G: when I built it, so when a user has a different driver letter to the same location, say P:, it causes a error...3078…no one connects with same driver letter, since we have many servers!

    Is there a way to automatically find the correct path (eg Drive letter) or set a general path (eg //shared/DB) ???


    Cheers

    Will

  2. #2
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Re: Different drive letters use by users when connecting to server!

    Originally posted by wavp
    I have a Access 97 database which users use often, this db is kept on a server, but users connect to it with different drive letters every time they use the shortcut on their desktop.

    The problem is that, in this db, there is a Linked table to a admin tool which I use to close down the DB, if there is a DB lock out. This tool is another Access DB, on the same server, but different folder.

    In the user DB, the main form has a VB Sub (OnTimer), so every 30secs it looks to see if the DB should be closed down, by accessing this link table....however the Link table uses a drive letter G: when I built it, so when a user has a different driver letter to the same location, say P:, it causes a error...3078…no one connects with same driver letter, since we have many servers!

    Is there a way to automatically find the correct path (eg Drive letter) or set a general path (eg //shared/DB) ???


    Cheers

    Will

    use network naming standards instead of drive letters ie
    computernam\share
    that will fix your broblem
    Jim

  3. #3
    Join Date
    Nov 2002
    Location
    Sacramento, CA
    Posts
    34

    Talking Re: Different drive letters use by users when connecting to server!

    Try this. It returns the full path the db is in.
    ie g:\database stuff\mydb\
    '-------------------------------------------------------
    'Code courtesy of
    'Terry Kreft & Ken Getz
    'Returns the directory the DB is currently running in
    '-------------------------------------------------------

    Function CurrentDBDir() As String
    Dim strDBPath As String
    Dim strDBFile As String
    strDBPath = CurrentDb.Name
    strDBFile = Dir(strDBPath)
    CurrentDBDir = Left(strDBPath, Len(strDBPath) - Len(strDBFile))
    End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •