Results 1 to 7 of 7

Thread: Open DB manually error

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    i am trying to open a access db manually from vb
    here is what i use
    Code:
       Accesspath = "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE"
    
        toShutTheFunctionUP = ShellExecute(Me.hwnd, "open", Accesspath, "Z:\My Directory\MyDB.mdb", "", SW_SHOWNORMAL)
    access cannot open because it says that
    it cannot open "z:\my.mdb"
    what it basically does is, looks for the first space in the string then treats that as the db name of db
    and ignores anything after that

    how can i send a string with directory path that contains spaces?
    please and thank you

  2. #2
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    You can use the ShortPath function:
    It return the shortpath(like in dos->8.3)

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539

    no shortpath ()

    there is no function of such
    there is a property of a file that is shortpath but not a function...

    still stuck

  4. #4

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    isn't that samething as my original post or i am just going blind?

  6. #6

  7. #7

Posting Permissions

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



Click Here to Expand Forum to Full Width