Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    6

    Unanswered: Get Removable Disk Drive Name

    Hi,

    I need to copy a table from the database that reside in a removable disk. But the drive name of this removable disk will be different when plug into different pc. Hence, is there any way for me to get the drive name before copy any table?

    Thanks for helping me....

  2. #2
    Join Date
    Jun 2004
    Posts
    92
    Quote Originally Posted by star212
    Hi,

    I need to copy a table from the database that reside in a removable disk. But the drive name of this removable disk will be different when plug into different pc. Hence, is there any way for me to get the drive name before copy any table?

    Thanks for helping me....
    You can do something like this:

    Code:
     Dim dbPath As String
     dbPath = InputBox("Enter Path To Table" + "(drive:\path\)", "Location of DB")
     If dbPath <> "" Then
    DoCmd.TransferSpreadsheet acImport, "Microsoft Access" , dbpath & "yourdbname",actable, "tabletoimport", "tabletoimportto"
    <rest of your code here>
    endif
    Basically make an input form to define the proper drive and/or path to the db. The example is very basic and would have to be refined for your application.

Posting Permissions

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