Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Posts
    173

    Unanswered: open a windows folder

    I have a serial number on a form that's unique for each record. I also have a windows folder located on a specific server named the same as the serial number. All these folders are located in one spot on the server. This is where we keep other files such as Word docs pertaining to this serial number. What code could I open each particular folder up in windows explorer when looking for info on serial number I have opened in access?

  2. #2
    Join Date
    Jun 2002
    Posts
    173
    I used the following code

    Dim stAppName As String

    stAppName = "EXPLORER.EXE \\SERVERNAME\SHARENAME\DOCS\"
    Call Shell(stAppName, 1)


    I'd like to have something like this but can't get it to work

    Dim stAppName As String

    stAppName = "EXPLORER.EXE \\FILE1\FILES\DOCIMAGING\[serialno]"
    Call Shell(stAppName, 1)

    The [serialno] would be the name of the field that matches the folder on the server.

  3. #3
    Join Date
    Apr 2003
    Location
    Santa Barbara, CA
    Posts
    67
    Originally posted by leeroy
    I used the following code

    Dim stAppName As String

    stAppName = "EXPLORER.EXE \\SERVERNAME\SHARENAME\DOCS\"
    Call Shell(stAppName, 1)


    I'd like to have something like this but can't get it to work

    Dim stAppName As String

    stAppName = "EXPLORER.EXE \\FILE1\FILES\DOCIMAGING\[serialno]"
    Call Shell(stAppName, 1)

    The [serialno] would be the name of the field that matches the folder on the server.

    Dim serialno$, stAppName$, stPathName$

    serialno = me!serialno
    stAppName = "EXPLORER.EXE "
    stPathName = "\\FILE1\FILES\DOCIMAGING\" & serialno & "\"

    if dir(stPathName) = stPathName then
    Call Shell(stAppName & stPathName, 1)
    else
    msgbox stPathName & " doesn't exist"
    endif

Posting Permissions

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