association

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • austinra
    New Member
    • Nov 2006
    • 4

    #1

    association

    i am searching for an answer but i'm not sure how to ask the question. in the program visual basic 6 i am writing i have a access file and a seprate folder that are associated with my program. the program, file, and folder are all located on my flash drive so becouse of the need to transport it to class. in the program both the access file and folder are located on the L drive (the name of the flash drive at my house), but at school the flash drive is located on the H drive. this causes a lot of changes in the program when coming from or going to school. this got me thinking; when i finish the program it would have to remain in the same place it was created and if the drive letter were to change i would loose the programs use. is their a way to make a file or folder moveable or reletive to the program so you can install it on any drive you wish.
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Originally posted by austinra
    i am searching for an answer but i'm not sure how to ask the question. in the program visual basic 6 i am writing i have a access file and a seprate folder that are associated with my program. the program, file, and folder are all located on my flash drive so becouse of the need to transport it to class. in the program both the access file and folder are located on the L drive (the name of the flash drive at my house), but at school the flash drive is located on the H drive. this causes a lot of changes in the program when coming from or going to school. this got me thinking; when i finish the program it would have to remain in the same place it was created and if the drive letter were to change i would loose the programs use. is their a way to make a file or folder moveable or reletive to the program so you can install it on any drive you wish.
    Hi. good question.
    This will work;
    Code:
    Dim strPath As String
    Dim strDatabase As String
    
    strPath = App.Path()
    strDatabase = strPath & "\YourDatabaseFolder\YourAccessName.mdb"

    Comment

    Working...