Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    Jan 2004
    Posts
    77

    Unanswered: VBA Code problem

    Not sure if this is a database question or general PC concern –

    We have a DB tracking engineering drawings. It includes a QueryByForm which lists appropriate files. It has a command button that opens the corresponding file with our CAD program. I did all the testing on my machine and it works great. I copied to others and it bombs. It says it can’t locate the file which resides on our server in folder Z:\plans\. If I move some of the files to their local machine as a test (i.e., C:\plans\), and change the code to look in C:\plans\ instead of Z:\plans\, it works fine. All persons have the same permission on the server as I do – some on XP, others on Win2K. So something’s apparently configured differently on my machine compared to theirs – but, I have no idea what.

    Any suggestions would be greatly appreciated.

    Thanks,
    SKK

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    They don't have a drive mapped to the letter Z

    Try UNC path: i.e. create the folder as a share and refer to it as
    \\sever-name\sharedfoldername$\yourdatabase.mdb
    George
    Home | Blog

  3. #3
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    Check the mapping for Z and make sure that it includes the same directories.

    z = \\servername\plans
    vs
    z= \\servername

  4. #4
    Join Date
    Jan 2004
    Posts
    77
    Identical. We are all pointing to the same folder on the same server.

    SKK

  5. #5
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    I assume you're linking to tables in the back end. In that case, check your Linked Table Manager (Tools -> Database Utilities -> Linked Table Manager) and make sure you're pointing to the right place.

    Hope this helps,
    Sam

  6. #6
    Join Date
    Jan 2004
    Posts
    77
    Yup look good. As a test, I even copied tables in so no linking but same results.

    Thanks,
    SKK

  7. #7
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    Please post the code you are using and a few sample records (containing the path).

    Did you try George's suggestion using the full server name?

  8. #8
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I might try (just to test and on a backup copy of the mdb on their computer), removing the linked tables and relink the tables just to see if you can see the Z: drive (or UNC path) from the mdb on their computer.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  9. #9
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I have seen network drive letters "not quite mapped". For example, drive Z may be mapped to the right location, but code cannot access drive Z until it is viewed in Windows Explorer. I have no idea why that happens, but it might be relevant?

    Other than that, I can only agree with suggestions already given.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  10. #10
    Join Date
    Jan 2004
    Posts
    77
    After much more testing, it may be some setting on the server. If i copy all CAD files to some other machine > share out the folder from that machine > re-map Z: to the new machine, all works fine. It only bombs when files are being shared from the main server. IT has been looking into this but they say all setting on the server are the same as test machines. We checked permissions, shares, account type, etc. Any other ideas?

    Thanks,
    SKK

  11. #11
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    As GeorgeV & Rogue have already suggested I'd reccomend using UNC rather than drive mapping
    so rather than Z:/path/to/file.ext
    use: //Servername/path/to/file.ext

    Ive seen similar problems to this a while back, admittedly on a netware server system where the logon script didn't always complete properly, or there was a shortage of resources on the client workstation. whether that will cleer the problem I don't know. however unless you change the server names the app will be a wee bit more bombproof.

    it has the added advantage that the /path/to/file.ext could be something simple such as //servername/CADData
    where CADdata is a specified share name ont he server
    I'd rather be riding on the Tiger 800 or the Norton

  12. #12
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Not being a network guy but have they tried re-sharing the main server? Are there any other problems when users say, open a word document from the main server?
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  13. #13
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Agreed with using UNC paths instead of mapped drive letters, but just to clarify:

    Z:\path\to\file.ext

    would turn into:

    \\Servername\sharename\path\to\file.ext

    Probably pedantic, but that's me.

    Can you run tests? See if the code can read anything from drive Z: or the UNC path? See if the command prompt can see drive Z at the time... perhaps that will put you on the right track.

    Will be interesting to see the solution to this one
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  14. #14
    Join Date
    Jan 2004
    Posts
    77
    Already tried that to no avail. It's only the CAD files that are causing a problem when being called from "Application.FileSearch".

    SKK

  15. #15
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by StarTrekker
    Agreed with using UNC paths instead of mapped drive letters, but just to clarify:

    Z:\path\to\file.ext

    would turn into:

    \\Servername\sharename\path\to\file.ext

    Probably pedantic, but that's me...
    true providing the Z: drive mapping isn't lost
    providing no one tinkers with the z drive mapping
    providing your logon script completes
    providing there are no resource issues
    providing the user doesn't attempt to use the machine as a local workstation and then connect to the network
    the UNC is more specific.. your network infrastructure will always resolve UNC names, the drive mapping is open to problems.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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